Skip to content

Commit

Permalink
made live edit work with multiple windows
Browse files Browse the repository at this point in the history
fixed --start-brk
  • Loading branch information
dannycoates committed Jul 30, 2010
1 parent b27b64a commit dc45824
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/inspector.js
Expand Up @@ -15,7 +15,7 @@ process.argv.forEach(function(arg) {
break; break;
case '--start-brk': case '--start-brk':
options.file = parts[1]; options.file = parts[1];
brk = true; options.brk = true;
break; break;
case '--agent-port': case '--agent-port':
options.webPort = parseInt(parts[1], 10); options.webPort = parseInt(parts[1], 10);
Expand Down
8 changes: 6 additions & 2 deletions front-end/node/Debugger.js
Expand Up @@ -65,8 +65,8 @@ WebInspector.nodeDebugger = (function() {
socket.onopen = function() { socket.onopen = function() {
console.log('socket open'); console.log('socket open');
WebInspector.debuggerWasEnabled(); WebInspector.debuggerWasEnabled();
sendRequest('scripts', { debugr.getScripts();
arguments: { includeSource: true, types: 4 }}); debugr.listBreakpoints();
}; };
}, },
close: function() { close: function() {
Expand All @@ -78,6 +78,10 @@ WebInspector.nodeDebugger = (function() {
list.push(callback); list.push(callback);
listeners[event] = list; listeners[event] = list;
}, },
getScripts: function() {
sendRequest('scripts', {
arguments: { includeSource: true, types: 4 }});
},
setBreakpoint: function(callId, sourceID, line, enabled, condition) { setBreakpoint: function(callId, sourceID, line, enabled, condition) {
var bp = breakpoints[sourceID + ':' + line]; var bp = breakpoints[sourceID + ':' + line];
if(bp) { if(bp) {
Expand Down
11 changes: 8 additions & 3 deletions front-end/node/InspectorFrontendHostStub.js
Expand Up @@ -99,8 +99,7 @@ WebInspector.InspectorFrontendHostStub = function()
msg.body.forEach(function(s) { msg.body.forEach(function(s) {
WebInspector.parsedScriptSource(s.id, s.name, s.source, s.lineOffset, 0); WebInspector.parsedScriptSource(s.id, s.name, s.source, s.lineOffset, 0);
}); });
debugr.listBreakpoints(); if (!msg.running && !WebInspector.panels.scripts._paused) {
if (!msg.running) {
debugr.getBacktrace(); debugr.getBacktrace();
} }
}); });
Expand Down Expand Up @@ -212,7 +211,13 @@ WebInspector.InspectorFrontendHostStub = function()
} }
}); });
debugr.on('changelive', function(msg) { debugr.on('changelive', function(msg) {
WebInspector.didEditScriptSource(msg.callId.id, msg.success, msg.message ||msg.callId.body); if (msg.callId) {
WebInspector.didEditScriptSource(msg.callId.id, msg.success, msg.message ||msg.callId.body);
}
else {
WebInspector.panels.scripts.reset();
WebInspector.nodeDebugger.getScripts();
}
}); });
debugr.on('frame', function(msg) { debugr.on('frame', function(msg) {


Expand Down
1 change: 0 additions & 1 deletion readme.md
Expand Up @@ -89,7 +89,6 @@ This is alpha quality code, so use at your own risk:


* save application settings * save application settings
* debug-agent needs a lot of work * debug-agent needs a lot of work
* try out live edit
* profiler panel * profiler panel


## Thanks ## Thanks
Expand Down

0 comments on commit dc45824

Please sign in to comment.