Closed
Bug 1575065
Opened 5 years ago
Closed 1 month ago
Breakpoints should work when reloading
Categories
(Core Graveyard :: Web Replay, defect, P1)
Core Graveyard
Web Replay
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: jlast, Unassigned)
References
Details
STR:
- go to https://firefox-dev.tools/debugger-examples/examples/todomvc/
- add a breakpoint in todo-view.js#35 in initialize
- add some todos
- reload
ER: pause on line 35
AR: don't pause
NOTE: that adding a new bp will pause, it is just the initial hits which are missed. This is similar for log points
Reporter | ||
Comment 1•5 years ago
|
||
A similar STR is for logpoints
STR:
- go to https://firefox-dev.tools/debugger-examples/examples/todomvc/
- add a logpoint in todo-view.js#53 in render
- add some todos
- reload
ER: see the render logpoints
AR: logpoints do not appear
Reporter | ||
Updated•5 years ago
|
Priority: P3 → P1
Reporter | ||
Comment 2•5 years ago
|
||
The last STR stated that you do not see logpoints after reloading. Now you do, but you cannot remove them...
STR:
- go to https://firefox-dev.tools/debugger-examples/examples/todomvc/
- add a logpoint in todo-view.js#53 in render
- add some todos
- reload
ER: see the log points and can remove them.
Reporter | ||
Comment 3•5 years ago
|
||
This fixes the issue with removing log points, but now you can't add them back.
diff --git a/devtools/client/debugger/src/client/firefox/commands.js b/devtools/client/debugger/src/client/firefox/commands.js
index cb9d6c388b9b..26a7c6d5bc8d 100644
--- a/devtools/client/debugger/src/client/firefox/commands.js
+++ b/devtools/client/debugger/src/client/firefox/commands.js
@@ -222,13 +222,13 @@ function detachWorkers() {
}
}
-function maybeGenerateLogGroupId(options) {
+function maybeGenerateLogGroupId(options, key) {
if (
options.logValue &&
currentTarget.traits &&
currentTarget.traits.canRewind
) {
- return { ...options, logGroupId: `logGroup-${Math.random()}` };
+ return { ...options, logGroupId: `logGroup-${key}` };
}
return options;
}
@@ -251,9 +251,10 @@ function setBreakpoint(
location: BreakpointLocation,
options: BreakpointOptions
) {
+ const key = locationKey(location);
maybeClearLogpoint(location);
- options = maybeGenerateLogGroupId(options);
- breakpoints[locationKey(location)] = { location, options };
+ options = maybeGenerateLogGroupId(options, key);
+ breakpoints[key] = { location, options };
return forEachThread(thread => thread.setBreakpoint(location, options));
}
Reporter | ||
Comment 4•5 years ago
|
||
Updated•4 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•