C/C++ breakpoint can't delete
When we delete the breakpoint in the "BREAKPOINTS" window, the breakpoint is still exist in debug console by "-exec i b", so it will break at that breakpoint. That will happen at debugging usually.
Can you provide additional logs by adding the following to your launch.json? "logging": { "engineLogging": true, "trace": true, "traceResponse": true }
STATUS 1:There are two breakpoints 2 and 3 at lines 4942 and 4967. STATUS 2:When I add a new breakpoints on line 4934,the result I get is 2、3、4、5、6 at 4942、4967、4934、4942、4967。
The Debug console output is blow(adding "logging" in the launch):
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (32998) ->~"Num Type Disp Enb Address What\n"\n"},"seq":3744} 1: (32998) ->~"Num Type Disp Enb Address What\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (32998) ->~"2 breakpoint keep y 0x00007fffd962bd84 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4942\n"\n"},"seq":3746} 1: (32998) ->~"2 breakpoint keep y 0x00007fffd962bd84 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4942\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (32998) ->~"3 breakpoint keep y 0x00007fffd962be99 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4967\n"\n"},"seq":3748} 1: (32998) ->~"3 breakpoint keep y 0x00007fffd962be99 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4967\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (32998) ->1088^done\n"},"seq":3750} 1: (32998) ->1088^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (32998) ->(gdb)\n"},"seq":3752} 1: (32998) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (32998) 1088: elapsed time 0\n"},"seq":3754} 1: (32998) 1088: elapsed time 0 --> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"Num Type Disp Enb Address What\n2 breakpoint keep y 0x00007fffd962bd84 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4942\n3 breakpoint keep y 0x00007fffd962be99 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4967\n\n"},"seq":3756} Num Type Disp Enb Address What 2 breakpoint keep y 0x00007fffd962bd84 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4942 3 breakpoint keep y 0x00007fffd962be99 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4967 -> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/Evaluate","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"17.1.20204.1","VS.Diagnostics.Debugger.HostVersion":"17.1.20204.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.Evaluate.Duration":12.0,"VS.Diagnostics.Debugger.Evaluate.IsError":false,"VS.Diagnostics.Debugger.Evaluate.ExecuteInConsole":true}},"seq":3758} --> R (evaluate-32): {"type":"response","request_seq":32,"success":true,"command":"evaluate","body":{"result":"","variablesReference":0},"seq":3760} <-- C (scopes-33): {"command":"scopes","arguments":{"frameId":1002},"type":"request","seq":33} --> R (scopes-33): {"type":"response","request_seq":33,"success":true,"command":"scopes","body":{"scopes":[{"presentationHint":"locals","name":"Locals","variablesReference":1000,"expensive":false},{"presentationHint":"registers","name":"Registers","variablesReference":1001,"expensive":true}]},"seq":3763} <-- C (variables-34): {"command":"variables","arguments":{"variablesReference":1000},"type":"request","seq":34} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (36031) <-1089-stack-list-variables 0\n"},"seq":3766} 1: (36031) <-1089-stack-list-variables 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (36032) ->1089^done,variables=[{name="sec",arg="1"}]\n"},"seq":3768} 1: (36032) ->1089^done,variables=[{name="sec",arg="1"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (36032) ->(gdb)\n"},"seq":3770} 1: (36032) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (36033) 1089: elapsed time 1\n"},"seq":3772} 1: (36033) 1089: elapsed time 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (36035) <-1090-var-create - * "sec"\n"},"seq":3774} 1: (36035) <-1090-var-create - * "sec" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (36041) ->1090^done,name="var4",numchild="0",value="1",type="UINT64",thread-id="1",has_more="0"\n"},"seq":3776} 1: (36041) ->1090^done,name="var4",numchild="0",value="1",type="UINT64",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (36041) ->(gdb)\n"},"seq":3778} 1: (36041) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (36041) 1090: elapsed time 6\n"},"seq":3780} 1: (36041) 1090: elapsed time 6 -> R (variables-34): {"type":"response","request_seq":34,"success":true,"command":"variables","body":{"variables":[{"name":"sec","value":"1","type":"UINT64","evaluateName":"sec","variablesReference":0,"memoryReference":"0x0000000000000001"}]},"seq":3782} <-- C (evaluate-35): {"command":"evaluate","arguments":{"expression":"修改日期","frameId":1002,"context":"hover"},"type":"request","seq":35} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (45535) <-1091-var-create - * "修改日期"\n"},"seq":3785} 1: (45535) <-1091-var-create - * "修改日期" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (45535) ->1091^error,msg="-var-create: unable to create variable object"\n"},"seq":3787} 1: (45535) ->1091^error,msg="-var-create: unable to create variable object" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (45535) ->(gdb)\n"},"seq":3789} 1: (45535) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (45535) 1091: elapsed time 0\n"},"seq":3791} 1: (45535) 1091: elapsed time 0 --> R (evaluate-35): {"type":"response","request_seq":35,"success":false,"command":"evaluate","message":"Evaluation error","body":{},"seq":3793} <-- C (setBreakpoints-36): {"command":"setBreakpoints","arguments":{"source":{"name":"proto_rtp.c","path":"/home/CRSv2.3/T0/20220127/modules/crs_lljx/RTP/v1.1/src/proto_rtp.c"},"lines":[4934,4942,4967],"breakpoints":[{"line":4934},{"line":4942},{"line":4967}],"sourceModified":false},"type":"request","seq":36} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49726) <-1092-break-insert -f proto_rtp.c:4934\n"},"seq":3796} 1: (49726) <-1092-break-insert -f proto_rtp.c:4934 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49730) ->1092^done,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="0x00007fffd962bd61",func="rtp_unpacket_fu_a_h265",file="src/proto_rtp.c",fullname="/home/CRSv2.3/T0/20220127/modules/crs_lljx/RTP/v1.1/src/proto_rtp.c",line="4934",thread-groups=["i1"],times="0",original-location="proto_rtp.c:4934"}\n"},"seq":3798} 1: (49730) ->1092^done,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="0x00007fffd962bd61",func="rtp_unpacket_fu_a_h265",file="src/proto_rtp.c",fullname="/home/CRSv2.3/T0/20220127/modules/crs_lljx/RTP/v1.1/src/proto_rtp.c",line="4934",thread-groups=["i1"],times="0",original-location="proto_rtp.c:4934"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49730) ->(gdb)\n"},"seq":3800} 1: (49730) ->(gdb) -> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49730) 1092: elapsed time 4\n"},"seq":3802} 1: (49730) 1092: elapsed time 4 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49732) Send Event AD7BreakpointBoundEvent\n"},"seq":3804} 1: (49732) Send Event AD7BreakpointBoundEvent --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49732) <-1093-break-insert -f proto_rtp.c:4942\n"},"seq":3806} 1: (49732) <-1093-break-insert -f proto_rtp.c:4942 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49733) ->1093^done,bkpt={number="5",type="breakpoint",disp="keep",enabled="y",addr="0x00007fffd962bd84",func="rtp_unpacket_fu_a_h265",file="src/proto_rtp.c",fullname="/home/CRSv2.3/T0/20220127/modules/crs_lljx/RTP/v1.1/src/proto_rtp.c",line="4942",thread-groups=["i1"],times="0",original-location="proto_rtp.c:4942"}\n"},"seq":3808} 1: (49733) ->1093^done,bkpt={number="5",type="breakpoint",disp="keep",enabled="y",addr="0x00007fffd962bd84",func="rtp_unpacket_fu_a_h265",file="src/proto_rtp.c",fullname="/home/CRSv2.3/T0/20220127/modules/crs_lljx/RTP/v1.1/src/proto_rtp.c",line="4942",thread-groups=["i1"],times="0",original-location="proto_rtp.c:4942"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49733) ->(gdb)\n"},"seq":3810} 1: (49733) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49733) 1093: elapsed time 1\n"},"seq":3812} 1: (49733) 1093: elapsed time 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49733) Send Event AD7BreakpointBoundEvent\n"},"seq":3814} 1: (49733) Send Event AD7BreakpointBoundEvent --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49733) <-1094-break-insert -f proto_rtp.c:4967\n"},"seq":3816} 1: (49733) <-1094-break-insert -f proto_rtp.c:4967 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49735) ->1094^done,bkpt={number="6",type="breakpoint",disp="keep",enabled="y",addr="0x00007fffd962be99",func="rtp_unpacket_fu_a_h265",file="src/proto_rtp.c",fullname="/home/CRSv2.3/T0/20220127/modules/crs_lljx/RTP/v1.1/src/proto_rtp.c",line="4967",thread-groups=["i1"],times="0",original-location="proto_rtp.c:4967"}\n"},"seq":3818} 1: (49735) ->1094^done,bkpt={number="6",type="breakpoint",disp="keep",enabled="y",addr="0x00007fffd962be99",func="rtp_unpacket_fu_a_h265",file="src/proto_rtp.c",fullname="/home/CRSv2.3/T0/20220127/modules/crs_lljx/RTP/v1.1/src/proto_rtp.c",line="4967",thread-groups=["i1"],times="0",original-location="proto_rtp.c:4967"} E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49735) ->(gdb)\n"},"seq":3820} 1: (49735) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49735) 1094: elapsed time 1\n"},"seq":3822} 1: (49735) 1094: elapsed time 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (49735) Send Event AD7BreakpointBoundEvent\n"},"seq":3824} 1: (49735) Send Event AD7BreakpointBoundEvent --> R (setBreakpoints-36): {"type":"response","request_seq":36,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"id":3,"verified":true,"line":4934,"BoundBreakpoints":[]},{"id":4,"verified":true,"line":4942,"BoundBreakpoints":[]},{"id":5,"verified":true,"line":4967,"BoundBreakpoints":[]}]},"seq":3826} --> E (breakpoint): {"type":"event","event":"breakpoint","body":{"reason":"changed","breakpoint":{"id":3,"verified":true,"line":4934,"BoundBreakpoints":[]}},"seq":3828} --> E (breakpoint): {"type":"event","event":"breakpoint","body":{"reason":"changed","breakpoint":{"id":4,"verified":true,"line":4942,"BoundBreakpoints":[]}},"seq":3830} --> E (breakpoint): {"type":"event","event":"breakpoint","body":{"reason":"changed","breakpoint":{"id":5,"verified":true,"line":4967,"BoundBreakpoints":[]}},"seq":3832} -exec i b <-- C (evaluate-37): {"command":"evaluate","arguments":{"expression":"-exec i b","frameId":1002,"context":"repl"},"type":"request","seq":37} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (57270) <-1095-interpreter-exec console "i b"\n"},"seq":3835} 1: (57270) <-1095-interpreter-exec console "i b" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (57273) ->~"Num Type Disp Enb Address What\n"\n"},"seq":3837} 1: (57273) ->~"Num Type Disp Enb Address What\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (57275) ->~"2 breakpoint keep y 0x00007fffd962bd84 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4942\n"\n"},"seq":3839} 1: (57275) ->~"2 breakpoint keep y 0x00007fffd962bd84 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4942\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (57275) ->~"3 breakpoint keep y 0x00007fffd962be99 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4967\n"\n"},"seq":3841} 1: (57275) ->~"3 breakpoint keep y 0x00007fffd962be99 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4967\n" E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (57275) ->~"4 breakpoint keep y 0x00007fffd962bd61 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4934\n"\n"},"seq":3843} 1: (57275) ->~"4 breakpoint keep y 0x00007fffd962bd61 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4934\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (57275) ->~"5 breakpoint keep y 0x00007fffd962bd84 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4942\n"\n"},"seq":3845} 1: (57275) ->~"5 breakpoint keep y 0x00007fffd962bd84 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4942\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (57275) ->~"6 breakpoint keep y 0x00007fffd962be99 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4967\n"\n"},"seq":3847} 1: (57275) ->~"6 breakpoint keep y 0x00007fffd962be99 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4967\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (57275) ->1095^done\n"},"seq":3849} 1: (57275) ->1095^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (57275) ->(gdb)\n"},"seq":3851} 1: (57275) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (57276) 1095: elapsed time 5\n"},"seq":3853} 1: (57276) 1095: elapsed time 5 --> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"Num Type Disp Enb Address What\n2 breakpoint keep y 0x00007fffd962bd84 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4942\n3 breakpoint keep y 0x00007fffd962be99 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4967\n4 breakpoint keep y 0x00007fffd962bd61 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4934\n5 breakpoint keep y 0x00007fffd962bd84 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4942\n6 breakpoint keep y 0x00007fffd962be99 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4967\n\n"},"seq":3855} Num Type Disp Enb Address What 2 breakpoint keep y 0x00007fffd962bd84 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4942 3 breakpoint keep y 0x00007fffd962be99 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4967 4 breakpoint keep y 0x00007fffd962bd61 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4934 5 breakpoint keep y 0x00007fffd962bd84 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4942 6 breakpoint keep y 0x00007fffd962be99 in rtp_unpacket_fu_a_h265 at src/proto_rtp.c:4967
E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/Evaluate","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"17.1.20204.1","VS.Diagnostics.Debugger.HostVersion":"17.1.20204.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.Evaluate.Duration":6.0,"VS.Diagnostics.Debugger.Evaluate.IsError":false,"VS.Diagnostics.Debugger.Evaluate.ExecuteInConsole":true}},"seq":3857}
--> R (evaluate-37): {"type":"response","request_seq":37,"success":true,"command":"evaluate","body":{"result":"","variablesReference":0},"seq":3859}
<-- C (scopes-38): {"command":"scopes","arguments":{"frameId":1002},"type":"request","seq":38}
--> R (scopes-38): {"type":"response","request_seq":38,"success":true,"command":"scopes","body":{"scopes":[{"presentationHint":"locals","name":"Locals","variablesReference":1002,"expensive":false},{"presentationHint":"registers","name":"Registers","variablesReference":1003,"expensive":true}]},"seq":3862}
<-- C (variables-39): {"command":"variables","arguments":{"variablesReference":1002},"type":"request","seq":39}
--> R (variables-39): {"type":"response","request_seq":39,"success":true,"command":"variables","body":{"variables":[{"name":"sec","value":"1","type":"UINT64","evaluateName":"sec","variablesReference":0,"memoryReference":"0x0000000000000001"}]},"seq":3865}

I have been using VSCode for a long time, That appearence has only happen in recent versions. It's been aroud since at least version 1.64.2. When I come to 1.65.1, It still hasn't changed, so I decided to submit the message here.
I am also experiencing this issue, breakpoints cannot be unset once they have been hit,
Can you share the version of GDB that you are using?
I am unable to reproduce this with:
- g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0
- GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
- VS Code Version: 1.65.2 (user setup)
- CppTools version: v1.9.3
I’m using exactly the same versions as you are
After more experimenting with it I found that I am able to set and remove breakpoints from VSCode that are created after program execution starts, but I cannot unset breakpoints that were set prior to starting the debug session. If I set a breakpoint at construction then I can set / remove breakpoints correctly, but it means I have to unset all breakpoints prior to starting the session, and enable them after the constructor break is hit
From: Andrew Wang @.> Sent: 14 March 2022 17:58 To: microsoft/vscode-cpptools @.> Cc: Phil Young @.>; Comment @.> Subject: Re: [microsoft/vscode-cpptools] C/C++ breakpoint can't delete (Issue #8996)
Can you share the version of GDB that you are using?
I am unable to reproduce this with:
- g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0
- GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
- VS Code Version: 1.65.2 (user setup)
- CppTools version: v1.9.3
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/vscode-cpptools/issues/8996#issuecomment-1067122287, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYFTQ25ZK2D5OOVNVPKQ2Y3U75433ANCNFSM5QIOMLIQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.@.>>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
- client : Windows 10, with VS Code 1.65.2 (.zip release)
- server: CentOS 7.0
- GCC 4.8.2
- GDB 7.6.1
- CppTools version: v1.8.4
- Remote - SSH v0.76.1
The hit breakpoint will be insert again. In the right situation, the breakpoint 7 will be inserted as a new, and the breakpoint 6, will not be insert.:
-- C (setBreakpoints-20): {"command":"setBreakpoints","arguments":{"source":{"name":"","path":"","sources":[],"checksums":[]},"lines":[6,7],"breakpoints":[{"line":6},{"line":7}],"sourceModified":false},"type":"request","seq":20} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (10412) <-1039-break-insert -f :7\n"},"seq":480} 1: (10412) <-1039-break-insert -f :7 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (10413) ->1039^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400549",func="main",file="",fullname="",line="7",thread-groups=["i1"],times="0",original-location=":7"}\n"},"seq":482} 1: (10413) ->1039^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400549",func="main",file="",fullname="",line="7",thread-groups=["i1"],times="0",original-location=":7"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (10413) ->(gdb)\n"},"seq":484} 1: (10413) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (10413) 1039: elapsed time 0\n"},"seq":486} 1: (10413) 1039: elapsed time 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (10414) Send Event AD7BreakpointBoundEvent\n"},"seq":488} 1: (10414) Send Event AD7BreakpointBoundEvent --> R (setBreakpoints-20): {"type":"response","request_seq":20,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"id":1,"verified":true,"line":6,"BoundBreakpoints":[]},{"id":2,"verified":true,"line":7,"BoundBreakpoints":[]}]},"seq":490} --> E (breakpoint): {"type":"event","event":"breakpoint","body":{"reason":"changed","breakpoint":{"id":2,"verified":true,"line":7,"BoundBreakpoints":[]}},"seq":492}
In the event of a failure,the breakpoint 4316 will be re-inserted together with the new 4317:
-- C (setBreakpoints-31): {"command":"setBreakpoints","arguments":{"source":{"name":"","path":"","sources":[],"checksums":[]},"lines":[4316,4317],"breakpoints":[{"line":4316},{"line":4317}],"sourceModified":false},"type":"request","seq":31} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (34697) <-1116-break-insert -f :4316\n"},"seq":3961} 1: (34697) <-1116-break-insert -f :4316 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (34701) ->1116^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x00007fffd95aa640",func="rtp_session_find",file="src/",fullname="",line="4316",thread-groups=["i1"],times="0",original-location=":4316"}\n"},"seq":3963} 1: (34701) ->1116^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x00007fffd95aa640",func="rtp_session_find",file="src/",fullname="",line="4316",thread-groups=["i1"],times="0",original-location=":4316"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (34701) ->(gdb)\n"},"seq":3965} 1: (34701) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (34701) 1116: elapsed time 3\n"},"seq":3967} 1: (34701) 1116: elapsed time 3 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (34701) Send Event AD7BreakpointBoundEvent\n"},"seq":3969} 1: (34701) Send Event AD7BreakpointBoundEvent --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (34701) <-1117-break-insert -f :4317\n"},"seq":3971} 1: (34701) <-1117-break-insert -f :4317 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (34702) ->1117^done,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="0x00007fffd95aa654",func="rtp_session_find",file="src/",fullname="",line="4317",thread-groups=["i1"],times="0",original-location=":4317"}\n"},"seq":3973} 1: (34702) ->1117^done,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="0x00007fffd95aa654",func="rtp_session_find",file="src/",fullname="",line="4317",thread-groups=["i1"],times="0",original-location=":4317"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (34702) ->(gdb)\n"},"seq":3975} 1: (34702) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (34702) 1117: elapsed time 1\n"},"seq":3977} 1: (34702) 1117: elapsed time 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (34703) Send Event AD7BreakpointBoundEvent\n"},"seq":3979} 1: (34703) Send Event AD7BreakpointBoundEvent --> R (setBreakpoints-31): {"type":"response","request_seq":31,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"id":2,"verified":true,"line":4316,"BoundBreakpoints":[]},{"id":3,"verified":true,"line":4317,"BoundBreakpoints":[]}]},"seq":3981} --> E (breakpoint): {"type":"event","event":"breakpoint","body":{"reason":"changed","breakpoint":{"id":2,"verified":true,"line":4316,"BoundBreakpoints":[]}},"seq":3983} --> E (breakpoint): {"type":"event","event":"breakpoint","body":{"reason":"changed","breakpoint":{"id":3,"verified":true,"line":4317,"BoundBreakpoints":[]}},"seq":3985}
Seeing the same issue, seems to have started with the most recent release. Breakpoints shows in VSCode debug view vs "exec info b" on gdb console don't line up, gdb has a lot more breakpoints. As a result, debug sessions stop at a lot more breakpoints than it should.
I'm also experiencing this issue in:
Version: 1.65.2
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T15:36:26.048Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.13.0-35-generic
I'm facing the same issue since 1.65. I noticed that the issue only occurs for breakpoints defined before starting a debugging session: these are sticky, i.e. remain active in gdb even if removed in vscode. However, breakpoints added and removed during a debugging session, are correctly set and unset.
I'm facing the same issue since 1.65. I noticed that the issue only occurs for breakpoints defined before starting a debugging session: these are sticky, i.e. remain active in gdb even if removed in vscode. However, breakpoints added and removed during a debugging session, are correctly set and unset.
I did not notice this behaviour of only pre added breakpoints bing sticky. I however, checked it and the behaviour described by @rhaschke is also present on my system.
I'm also seeing this starting in a recent release
As a temporary workaround I've downgraded to v1.7.1. This seems to be the latest version without the problem.
Was able to reproduce the issue with this scenario: https://github.com/microsoft/vscode-cpptools/issues/9095
Marking as duplicate.