Conditional Breakpoints - pressing enter in the panel adds a new line
Categories
(DevTools :: Debugger, defect, P1)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: jlast, Assigned: chujunlu)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug)
Attachments
(1 file)
STR:
- right click on a line
- select add a conditional breakpoint
- type in the panel
- move the cursor somewhere in the middle of the text
- press enter
ER: saves the condition
AR: saves the condition w/ a new line where the cursor was
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
I believe this was introduced with the change to allow the new line for logpoints.
I came up with a different approach to tackle the issue I showed to David in Tuesday's meeting. I'm comparing two implementations. Will send a patch when I'm ready. :)
Comment 3•6 years ago
|
||
Thank you Chujun!
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
The conditional breakpoint panel is wrapped in CodeMirror (starting from https://github.com/firefox-devtools/debugger/commit/6b0b968515ee0511899f80feb95a25d1f855073d). When hitting Enter
, debugger/node_modules/codemirror/lib/codemirror.js will run line 7153 onKeyDown(), in which a new line is added. Then ConditionalPanel.js onKey() runs.
Solution: Ask CodeMirror not to add a new line when hit Enter
.
Question:
I added two test cases to Mochitest. If I put a debugger;
statement in the test file, ran ./mach mochitest --jsdebugger file/path, keep
step over, all tests pass. But when I ran
./mach mochitest same/file/path`, terminal stopped at "waiting for state change" then gave an error "Failed to retrieve MOZ_UPLOAD_DIR env var."
Comment 6•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Description
•