3

Using Visual Studio Code, I’ve discovered what I think may be a bug. I’ve set some breakpoints in some Powershell code and debugged. I then decided to remove the breakpoints (F9) and run again. However, Visual Studio Code must cache the breakpoints because they still break when I run the code.

Is this a legitimate bug? Does anyone know a way around this?

  • Is this a legitimate bug? - No; This is how breakpoints have always worked in Visual Studio. – Ramhound Jun 6 '17 at 18:18
  • 1
    It's not Visual Studio. It's Visual Studio Code. And, once I remove a breakpoint, I do not expect it to 'hit' when I run the code again. – rrirower Jun 6 '17 at 18:20
  • It still isn't a bug. – Ramhound Jun 6 '17 at 18:21
  • 1
    FWIW, this does not sound like the expected behavior to me. Have you checked that you have the latest version of the Powershell Extension for VS Code? Perhpas try the "Reapply All Breakpoints" command after starting your debugging session. – heavyd Jun 6 '17 at 19:21
  • 1
    Looks like this issue has already been reported. looks like there is a workaround. – heavyd Jun 6 '17 at 19:24
0

As the comments say, this is a bug reported here: https://github.com/PowerShell/vscode-powershell/issues/625#issuecomment-290929624

The workaround is to only remove breakpoints while the debugger is running.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.