Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

retrieve script source when a breakpoint is hit on a line where we do…

…n't have the source already
  • Loading branch information...
commit 1fb8d3d9f39e47a86faf0bd08a7fb3b5e68c819b 1 parent 05c6ebb
@dannycoates dannycoates authored
View
7 front-end/node/Debugger.js
@@ -80,9 +80,10 @@ WebInspector.nodeDebugger = (function() {
list.push(callback);
listeners[event] = list;
},
- getScripts: function() {
- sendRequest('scripts', {
- arguments: { includeSource: true, types: 4 }});
+ getScripts: function(ids) {
+ var args = { arguments: { includeSource: true, types: 4 }};
+ if(ids) { args.arguments.ids = ids; }
+ sendRequest('scripts', args);
},
setBreakpoint: function(callId, sourceID, line, enabled, condition) {
var bp = breakpoints[sourceID + ':' + line];
View
5 front-end/node/InspectorFrontendHostStub.js
@@ -237,6 +237,11 @@ WebInspector.InspectorFrontendHostStub = function()
// events
debugr.on('break', function(msg) {
+ var scripts = WebInspector.panels.scripts._sourceIDMap,
+ id = msg.body.script.id;
+ if(scripts[id] == null) {
+ debugr.getScripts([id]);
+ }
debugr.getBacktrace();
});
debugr.on('exception', function(msg) {
Please sign in to comment.
Something went wrong with that request. Please try again.