violentmonkey: Firefox does not stop on keyword 'debugger'
I don’t know whether it is VM issue or Firefox issue, but if I put debugger
keyword inside my userscript to debug it, Firefox won’t stop.
I have to debug only using console.log
statements. It is very inconvenient.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (10 by maintainers)
Assuming you’ve already switched to
content
mode, there’s another option in devtools settings that you need to enable:debugger
statement is a part of JavaScript language, Violentmonkey doesn’t have influence over that.You can switch your userscript to
content
injection mode for better debugging in Firefox, but forpage
injection mode you’ll have to use Chrome because sensible debugging of such scripts is not implemented in Firefox at all.BTW devtools debugger allows you to set breakpoints manually in its source code editor without the need to use
debugger
statement. In Chrome it works for both injection modes, in Firefox it works only in the content mode.