Vscode-cpptools: Modifying conditional breakpoints while debugging does not work due to VSCode change

Created on 20 Jul 2018  路  16Comments  路  Source: microsoft/vscode-cpptools

VS Code version: 1.25.1

Steps to reproduce

Create C++ project and create a conditional breakpoint that will be true. Start debugging. Once you hit the breakpoint, change it to a false statement. F5.

Expected behavior

Once it becomes a false statement, it should not hit the breakpoint.

Actual behavior

It will always hit the breakpoint due to the original condition

Issue reason:

VSCode changed how they updated breakpoints. Instead of removing then adding a new breakpoint, they use the same breakpoint id.

See: https://github.com/Microsoft/vscode/issues/42200

bug debugger fixed (release pending)

Most helpful comment

This is also a problem if you start with a regular breakpoint and make it a conditional breakpoint. In that case, the condition is not applied and the breakpoint stays a regular breakpoint. I could verify this with "engineLogging": true in the debug console: no gdb commands are sent when modifying the breakpoint.

All 16 comments

This is also a problem if you start with a regular breakpoint and make it a conditional breakpoint. In that case, the condition is not applied and the breakpoint stays a regular breakpoint. I could verify this with "engineLogging": true in the debug console: no gdb commands are sent when modifying the breakpoint.

How to upvote it?

Click the reaction icon and choose the 馃憤

image

Thanks, I did it before, just wasn't sure it's it.

As a workaround, breakpoints can still be modified in gcc via the debugging console :
-exec cond <breakpoint_number> <condition>
eg:
-exec cond 2 pStruct != 0x0
obviously, it will not be visible in the GUI :(

The issue is still present. I thought I am losing it :)

Please, solve this issue.
It would be very useful during debugging

I am getting behaviour where once the conditional breakpoint is hit once, it is no longer conditional

Issue still reproducible on 1.40.2. Workaround described in https://github.com/microsoft/vscode-cpptools/issues/2297#issuecomment-484514159 still applies.

the issue is still here!

Issue (The condition for a breakpoint failed to execute if expression is a string - Still failing #5676) retested with version https://github.com/microsoft/vscode-cpptools/releases/tag/0.29.0-insiders and this does not fix the error.
2020-07-05_11-36-07

@carrigiljavia Are you using the debugger configuration type: cppvsdbg?

@WardenGnaw Yes sir.
image

Is this issue not fixed?

It is fixed for cppdbg.

Tracking for cppvsdbg is at https://github.com/microsoft/vscode-cpptools/issues/5676

Was this page helpful?
0 / 5 - 0 ratings