Skip to content

Instantly share code, notes, and snippets.

@bhackett1024
Created February 19, 2019 22:13
Show Gist options
  • Save bhackett1024/e129a0833096fbd71955e3b1567cf974 to your computer and use it in GitHub Desktop.
Save bhackett1024/e129a0833096fbd71955e3b1567cf974 to your computer and use it in GitHub Desktop.
diff --git a/devtools/client/debugger/new/src/client/firefox/commands.js b/devtools/client/debugger/new/src/client/firefox/commands.js
--- a/devtools/client/debugger/new/src/client/firefox/commands.js
+++ b/devtools/client/debugger/new/src/client/firefox/commands.js
@@ -179,9 +179,15 @@ async function setBreakpoint(
location: BreakpointLocation,
options: BreakpointOptions
) {
- breakpoints[locationKey(location)] = { location, options };
- for (const thread of getAllThreadClients()) {
- await thread.setBreakpoint(location, options);
+ try {
+ breakpoints[locationKey(location)] = { location, options };
+ for (const thread of getAllThreadClients()) {
+ console.log("> client setBreakpoint start", thread.actor);
+ await thread.setBreakpoint(location, options);
+ console.log("> client setBreakpoint done", thread.actor);
+ }
+ } catch (e) {
+ console.log("> client setBreakpoint exception: ", e);
}
}
diff --git a/devtools/server/actors/thread.js b/devtools/server/actors/thread.js
--- a/devtools/server/actors/thread.js
+++ b/devtools/server/actors/thread.js
@@ -314,6 +314,7 @@ const ThreadActor = ActorClassWithSpec(t
},
setBreakpoint(location, options) {
+ console.log(`> setBreakpoint`, this.actorID, location)
const actor = this.breakpointActorMap.getOrCreateBreakpointActor(location);
actor.setOptions(options);
@@ -328,11 +329,15 @@ const ThreadActor = ActorClassWithSpec(t
sourceActor.applyBreakpoint(actor);
}
}
+ console.log(`> setBreakpoint (done)`, this.actorID, location)
},
removeBreakpoint(location) {
+ console.log(`> removeBreakpoint`, this.actorID, location)
+
const actor = this.breakpointActorMap.getOrCreateBreakpointActor(location);
actor.delete();
+ console.log(`> removeBreakpoint (done)`, this.actorID, location)
},
removeXHRBreakpoint: function(path, method) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment