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
I added two test cases to Mochitest. If I put a
debugger; statement in the test file, ran ./mach mochitest --jsdebugger file/path
, keepstep 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."