I must be doing something stupidly wrong as I just cannot seem to add breakpoints in Visual Studio Code.
The following pops up when I right click on my code. (left clicking beside the line numbers didn't work either)
I've read the documentation here https://code.visualstudio.com/docs/editor/debugging#_breakpoints
It states:
Breakpoints can be toggled by clicking on the editor margin.
I have no idea what it is or where I find it. To say the least the documentation for beginners is lacking.
Go to VS->Settings->Debug and change "debug. allowBreakpointsEverywhere" to true. This was exactly the solution for me, I was unable to set breakpoints when editing JS within an HTML file.
If you delete all the breakpoints from your code at any time, you can easily import them by just clicking on the “ Import “ breakpoints button. This will restore all of your saved breakpoints. Note: Breakpoint Import depends on the line number where you have set your breakpoint earlier.
Press F3 and then press F9 to add a breakpoint.
Go to VS->Settings->Debug and change "debug.allowBreakpointsEverywhere" to true.
I also ran into this issue. Make sure you don't have
"editor.glyphMargin": false,
in your user or workspace settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With