iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🦁

Enabling and Disabling All Breakpoints in VSCode

に公開

This is often useful when you want to enable breakpoints only after proceeding to a specific screen.

From the Debugger

You can enable or disable all breakpoints by clicking the middle icon among the three icons on the right.

However, note that clicking the leftmost icon among those three will delete all breakpoints. (And it does so without any confirmation message!)

I have accidentally deleted all my breakpoints several times, so I recommend using the Command Palette described below instead.

image-20210902012921949

From the Command Palette

Call up the Command Palette with ctrl-shift-p and search for break.

You will then see Enable All Breakpoints and Disable All Breakpoints.

You can use these to enable or disable all breakpoints.

image-20210902013005464

Also, the commands you execute will appear in the history the next time you open the Command Palette.

Since you often repeat enabling and disabling all breakpoints during debugging, using that history works quite well.

image-20210902015307327

Discussion