From cca897ef5d92b20c7862fab00116ea0727439c10 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 30 Jan 2019 23:13:45 +0100 Subject: inspector,vm: remove --eval wrapper Report the actual source code when running with `--eval` and `--inspect-brk`, by telling the vm module to break on the first line of the script being executed rather than wrapping the source code in a function. PR-URL: https://github.com/nodejs/node/pull/25832 Reviewed-By: Eugene Ostroukhov Reviewed-By: Joyee Cheung --- test/sequential/test-inspector-scriptparsed-context.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/sequential/test-inspector-scriptparsed-context.js') diff --git a/test/sequential/test-inspector-scriptparsed-context.js b/test/sequential/test-inspector-scriptparsed-context.js index 56cc41dd86..944829f59d 100644 --- a/test/sequential/test-inspector-scriptparsed-context.js +++ b/test/sequential/test-inspector-scriptparsed-context.js @@ -51,28 +51,28 @@ async function runTests() { { 'method': 'Debugger.enable' }, { 'method': 'Runtime.runIfWaitingForDebugger' } ]); - await session.waitForBreakOnLine(4, '[eval]'); + await session.waitForBreakOnLine(2, '[eval]'); await session.send({ 'method': 'Runtime.enable' }); await getContext(session); await session.send({ 'method': 'Debugger.resume' }); const childContext = await getContext(session); - await session.waitForBreakOnLine(13, '[eval]'); + await session.waitForBreakOnLine(11, '[eval]'); console.error('[test]', 'Script is unbound'); await session.send({ 'method': 'Debugger.resume' }); - await session.waitForBreakOnLine(17, '[eval]'); + await session.waitForBreakOnLine(15, '[eval]'); console.error('[test]', 'vm.runInContext associates script with context'); await session.send({ 'method': 'Debugger.resume' }); await checkScriptContext(session, childContext); - await session.waitForBreakOnLine(20, '[eval]'); + await session.waitForBreakOnLine(18, '[eval]'); console.error('[test]', 'vm.runInNewContext associates script with context'); await session.send({ 'method': 'Debugger.resume' }); const thirdContext = await getContext(session); await checkScriptContext(session, thirdContext); - await session.waitForBreakOnLine(23, '[eval]'); + await session.waitForBreakOnLine(21, '[eval]'); console.error('[test]', 'vm.runInNewContext can contain debugger statements'); await session.send({ 'method': 'Debugger.resume' }); -- cgit v1.2.3