microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.52k stars 1.55k forks source link

Counting breakpoints not working #714

Open kanflo opened 7 years ago

kanflo commented 7 years ago

The cpptools extension does not add the gdb ignore command for counting breakpoints:

Right click a line and select "Add Conditional Breakpoint". Select "Hit Count", enter a value, press enter and the log says:

1: (853124) <-1099-break-insert -f main.c:34
1: (853127) ->1099^done,bkpt={number="13",type="breakpoint",disp="keep",enabled="y",addr="0x08000156",func="main",file="main.c",fullname="/home/johan/github/arm/pill/main.c",line="34",thread-groups=["i1"],times="0",original-location="main.c:34"}
1: (853127) ->(gdb)
1: (853127) 1099: elapsed time 2

The breakpoint was added but not set as counting (note "13" above is the number of the bp.). A manual -exec ignore 13 10 does the trick.

RaJiska commented 6 years ago

Same issue here.

letmaik commented 6 years ago

Can confirm this is not working, it is treated like a regular breakpoint currently.

aallrd commented 4 years ago

Hello, I can confirm this is not working with cpptools 0.29.0, it sets a regular breakpoint:

1: (1067827) <-1215-break-insert -f myFunc.c:10
1: (1067904) ->1215^done,bkpt={number="9",type="breakpoint",disp="keep",enabled="y",addr="0x000000000a6e09c5",func="myFunc",file="/SOURCE/lib/myFunc.c",fullname="/SOURCE/lib/myFunc.c",line="10",thread-groups=["i1"],times="0",original-location="myFunc.c:10"} 
1: (1067904) ->(gdb) 
1: (1067904) 1215: elapsed time 77 
1: (1067904) Send Event AD7BreakpointBoundEvent

Manually calling the command -exec ignore <BREAKPOINT_NUMBER> <HIT_COUNT> in the debug console after transforms it successfully in a conditional breakpoint.

FDCTLC commented 4 years ago

Just for information, currently the VScode extension https://github.com/WebFreak001/code-debug allows to use the counting breakpoint as we would love to do with vscode-cpptools extension.

andylatham82 commented 3 years ago

Hello, I can confirm this is not working with cpptools 0.29.0, it sets a regular breakpoint:

1: (1067827) <-1215-break-insert -f myFunc.c:10
1: (1067904) ->1215^done,bkpt={number="9",type="breakpoint",disp="keep",enabled="y",addr="0x000000000a6e09c5",func="myFunc",file="/SOURCE/lib/myFunc.c",fullname="/SOURCE/lib/myFunc.c",line="10",thread-groups=["i1"],times="0",original-location="myFunc.c:10"} 
1: (1067904) ->(gdb) 
1: (1067904) 1215: elapsed time 77 
1: (1067904) Send Event AD7BreakpointBoundEvent

Manually calling the command -exec ignore <BREAKPOINT_NUMBER> <HIT_COUNT> in the debug console after transforms it successfully in a conditional breakpoint.

This works.

Is this problem something that's going to get fixed?

crazycliffy commented 3 years ago

Confirmed hit points counting still not working in

ms-vscode.cpptools, Version: 1.7.1, Last updated on 10/19/2021, 19:54:55

unrelated, but above version LogPoints and conditional breakpoints are working well.

DTHaydon commented 2 years ago

Using "Hit Count" also doesn't work for lldb

Manually calling the command: -exec break modify -i <HIT_COUNT> <BREAKPOINT_NUMBER> in the debug console does work

macOS 12.0.1 ms-vscode.cpptools 1.7.1

youngfinn commented 2 years ago

This is still an issue on my machine.

Manually calling the command is working.

pop!_OS 22.04 ms-vscode.cpptools 1.10.8

xueqianz commented 1 year ago

Still not works on v1.14.4.

But I need to find a way to execute such command inside an extension. :(

Windows 11 Version 22H2 (OS Build 22621) MinGW ms-vscode.cpptools 1.14.4

sj-raima commented 12 months ago

Still an issue October 2023!

FlashBarryAllen commented 11 months ago

Still not working on version 1.84.2. Why this feature--Hit Count can't be supported by gdb debbuger?