This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
[Breakpoints] Leftover breakpoint breaks the debugger #3682
Labels
Milestone
Comments
@eoger mind sharing the STR? I'd like to see if i can reproduce this and see what's going on |
@eoger Was this in Nightly? |
Yes this was Nightly |
@jasonLaster wasn't able to reproduce exactly. But:
From then the breakpoint has disappeared, but I can't set it up again (breakpoint disappears after I click): |
STR
Errors in console: |
jasonLaster
changed the title
Leftover breakpoint breaks the debugger
[Breakpoints] Leftover breakpoint breaks the debugger
Aug 23, 2017
I believe this bug is coming the fact that we "move" breakpoints to keep them in the same original location when the user reloads. Scenario:
This diff is a sketch of what i think the solution should look like. When we see the new and old generated location is different, we remember to clean up after ourselves and remove the breakpoint. diff --git a/src/actions/breakpoints/syncBreakpoint.js b/src/actions/breakpoints/syncBreakpoint.js
index ee220b4..4237afb 100644
--- a/src/actions/breakpoints/syncBreakpoint.js
+++ b/src/actions/breakpoints/syncBreakpoint.js
@@ -64,6 +64,10 @@ export async function syncClientBreakpoint(
newGeneratedLocation
);
+ if (locationMoved(generatedLocation, newGeneratedLocation)) {
+ await client.removeBreakpoint(generatedLocation);
+ }
+
const breakpoint = {
...pendingBreakpoint,
id: makeLocationId(newLocation),
diff --git a/src/client/firefox/commands.js b/src/client/firefox/commands.js
index 40f2232..e405e9d 100644
--- a/src/client/firefox/commands.js
+++ b/src/client/firefox/commands.js
@@ -125,9 +125,9 @@ function setBreakpoint(
});
}
-function removeBreakpoint(breakpoint: Breakpoint) {
+function removeBreakpoint(generatedLocation) {
try {
- const id = makeLocationId(breakpoint.generatedLocation);
+ const id = makeLocationId(generatedLocation);
const bpClient = bpClients[id];
if (!bpClient) {
console.warn("No breakpoint to delete on server"); |
This was referenced Aug 26, 2017
Merged
This is fixed here: |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I set a breakpoint in a previous session in the browser toolbox debugger.
When I open the debugger (even after restarting the browser multiple times), clicks on the Firefox UI are not registered and CSS
:hover
rules are not applied.Trying to remove that breakpoint triggers an error.
Screencast:
https://gfycat.com/gifs/detail/JubilantDeepAyeaye
Entire screenshot of the errors in the screencast:
cc @vladikoff
The text was updated successfully, but these errors were encountered: