Browse Source

debugger: fix unhandled error in setBreakpoint

Fix Interface.setBreakpoint() to correctly handle an attempt to set a
breakpoint in the current script when there is no current script.
This usually happens when the debugged process is not paused.

Fixes: https://github.com/joyent/node/issues/6453
PR-URL: https://github.com/joyent/node/pull/6460
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
v0.11.15-release
Miroslav Bajtoš 12 years ago
committed by Chris Dickinson
parent
commit
e93ff4f0ce
  1. 6
      lib/_debugger.js

6
lib/_debugger.js

@ -1360,6 +1360,12 @@ Interface.prototype.setBreakpoint = function(script, line,
script = this.client.currentScript;
}
if (script === undefined) {
this.print('Cannot determine the current script, ' +
'make sure the debugged process is paused.');
return;
}
if (/\(\)$/.test(script)) {
// setBreakpoint('functionname()');
var req = {

Loading…
Cancel
Save