From f6b29a07c42c6c38ff5a2501ccea6868ebbfca0c Mon Sep 17 00:00:00 2001 From: Logan Smyth Date: Mon, 17 Dec 2018 19:20:05 +0000 Subject: [PATCH] Bug 1510463 - Allow adding breakpoints without pausing. r=jlast Differential Revision: https://phabricator.services.mozilla.com/D13737 --HG-- extra : moz-landing-system : lando --- devtools/server/actors/root.js | 3 +++ devtools/shared/client/source-client.js | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/devtools/server/actors/root.js b/devtools/server/actors/root.js index 0a0c466f2297..dfd5c3e077e2 100644 --- a/devtools/server/actors/root.js +++ b/devtools/server/actors/root.js @@ -136,6 +136,9 @@ RootActor.prototype = { noBlackBoxing: false, // Support for server pretty-printing has been removed. noPrettyPrinting: true, + // Added in Firefox 66. Indicates that clients do not need to pause the + // debuggee before adding breakpoints. + breakpointWhileRunning: true, // Trait added in Gecko 38, indicating that all features necessary for // grabbing allocations from the MemoryActor are available for the performance tool memoryActorAllocations: true, diff --git a/devtools/shared/client/source-client.js b/devtools/shared/client/source-client.js index f27c9ffb12aa..4ade38bd6486 100644 --- a/devtools/shared/client/source-client.js +++ b/devtools/shared/client/source-client.js @@ -194,6 +194,12 @@ SourceClient.prototype = { }); }; + // With async sourcemap processing removed from the server, it is not + // necessary for clients to pause the debuggee before adding breakpoints. + if (this._client.mainRoot.traits.breakpointWhileRunning) { + return doSetBreakpoint(); + } + // If the debuggee is paused, just set the breakpoint. if (this._activeThread.paused) { return doSetBreakpoint();