Indicating previous breakpoints when restarting the debugger. #7027

Closed
wavded opened this Issue Feb 2, 2014 · 2 comments

Comments

Projects
None yet
4 participants

wavded commented Feb 2, 2014

Let's say we have a uber simple debug.js program:

var a = 1
a = 2
a = 3

Breakpoints get restored after using the restart or run command, but I loose the * indicator in my code view as shown by this debugging session output:

$ node debug debug.js
< debugger listening on port 5858
connecting... ok
break in debug.js:1
  1 var a = 1
  2 a = 2
  3 a = 3
debug> sb(3)
  1 var a = 1
  2 a = 2
* 3 a = 3 <= LINE HAS A * INDICATOR
  4
  5 });
debug> restart
program terminated
< debugger listening on port 5858
connecting... ok
Restoring breakpoint debug.js:3
Warning: script 'debug.js' was not loaded yet.
break in debug.js:1
  1 var a = 1
  2 a = 2
  3 a = 3  <= LINE HAS NO * INDICATOR
debug> cont
break in debug.js:3
  1 var a = 1
  2 a = 2
  3 a = 3 <= LINE HAS NO * INDICATOR
  4
  5 });

trevnorris added the debugger label Feb 5, 2014

Owner

indutny commented Feb 9, 2014

Thanks for reporting it. Unfortunately, debugger isn't my (and probably others) priority right now, as we are hurrying to fix all issues before v0.12 release, but I'll definitely land a PR that will fix this.

indutny added this to the v0.13 milestone Feb 9, 2014

@alFReD-NSH alFReD-NSH added a commit to alFReD-NSH/node that referenced this issue Feb 15, 2014

@alFReD-NSH alFReD-NSH debugger: Fix breakpoint not showing after restart
fixes #7027
97d5895

@alFReD-NSH alFReD-NSH added a commit to alFReD-NSH/node that referenced this issue Feb 15, 2014

@alFReD-NSH alFReD-NSH debugger: Fix breakpoint not showing after restart
The reason this wasn't working was because after restart, when restoring
breakpoints the scripts wasn't loaded, so the breakpoint.script was
undefined. As a fix I added another check to use breakpoint.scriptReq
instead of breakpoint.script, which is the same except when the
breakpoint is a function.

fixes #7027
0064c41

@alFReD-NSH alFReD-NSH added a commit to alFReD-NSH/node that referenced this issue Feb 15, 2014

@alFReD-NSH alFReD-NSH debugger: Fix breakpoint not showing after restart
The reason this wasn't working was because after restart, when restoring
breakpoints the scripts wasn't loaded, so the breakpoint.script was
undefined. As a fix I added another check to use breakpoint.scriptReq
instead of breakpoint.script, which is the same except when the
breakpoint is a function.

fixes #7027
b7aa9a5

@tjfontaine tjfontaine added a commit that referenced this issue Feb 18, 2014

@alFReD-NSH @tjfontaine alFReD-NSH + tjfontaine debugger: Fix breakpoint not showing after restart
The reason this wasn't working was because after restart, when restoring
breakpoints the scripts wasn't loaded, so the breakpoint.script was
undefined. As a fix I added another check to use breakpoint.scriptReq
instead of breakpoint.script, which is the same except when the
breakpoint is a function.

fixes #7027
562b015

Fixed in 562b015

tjfontaine closed this Feb 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment