Search code examples
debuggingpycharmspydervisual-studio-debuggingconditional-breakpoint

Is there a way to deactivate (but not delete) conditional breakpoints when debugging?


It might be easy to just turn them off if it's a regular breakpoint, but sometimes I want to just deactivate the conditional breakpoint for a while, and have the option to turn it back (with the conditional still being written out so I don't have to retype it again). Do any of these IDE's have this capability?


Solution

  • 1, For Visual Studio.

    The answer is YES. Visual Studio supports this:

    Move the cursor to the breakpoint you set:

    enter image description here

    You can take a look at the official document of Visual Studio:

    Set breakpoints in source code

    enter image description here

    Breakpoint conditions

    2, For PyCharm

    The answer is YES. PyCharm support this:

    Disable and Enable breakpoints in PyCharm

    enter image description here

    3, For Spyder

    The answer is NO. No such feature.