Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Fix built-in debugger breaks just before a script #1042

Closed
wants to merge 2 commits into from
Closed

Fix built-in debugger breaks just before a script #1042

wants to merge 2 commits into from

Conversation

koichik
Copy link

@koichik koichik commented May 12, 2011

When the built-in debugger is started, it runs script until hits breakpoint. But on a slow (virtual) machine, the debugger breaks just before a script.

Reproduce:

$ node debug simple.js 
debug> run
debugger listening on port 5858
connecting...ok
breakpoint #1 in #<Object>.[anonymous](exports=#<Object>, require=function require(path) {
    return Module._load(path, self);
  }, module=#<Module>, __filename=/tmp/simple.js, __dirname=/tmp), /tmp/simple.js:1
(function (exports, require, module, __filename, __dirname) { var s = 'Hello, Debugger!';
                                                              ^
debug> 

The debugger (parent) process spawned child process with --debug-brk option and sent 'continue' request to the V8. On the slow machine, the V8 still compiles the scripts, it did not yet break it. So the 'continue' request was ignored.

The debugger should wait to send 'continue' until it receives 'break' event.

@koichik koichik closed this Oct 24, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant