You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C pause: {"threadId":57005}
R: {"success":true,"message":null,"request_seq":12,"command":"pause","body":null,"running":false,"refs":null,"seq":0,"type":"response"}
Clone of microsoft/vscode#28246. Wasn't sure which repo was appropriate for this ticket.
It doesn't actually pause the CPU.
I can set only set breakpoints before the debugger starts or when its already halted at another breakpoint.
This is the log when trying to set a breakpoint when the cpu isn't halted:
C setBreakpoints: {"source":{"path":"/home/arosenthal/Documents/code/path/to/file.c","name":"file.c"},"lines":[47],"breakpoints":[{"line":47}],"sourceModified":false}
R: {"success":true,"message":null,"request_seq":19,"command":"setBreakpoints","body":{"breakpoints":[{"id":1,"verified":true,"line":47,"message":null}]},"running":false,"refs":null,"seq":0,"type":"response"}
E breakpoint: {"reason":"changed","breakpoint":{"id":1,"verified":false,"line":47,"message":"Attempting to bind the breakpoint...."},"type":"breakpoint"}
1: (42477) ->~"\nProgram received signal "
1: (42478) ->~"SIGTRAP, Trace/breakpoint trap.\n"
E output: {"category":"stdout","output":"\nProgram received signal ","data":null,"type":"output"}
arosenthal@alan-lenovo-ubuntu:~$ arm-none-eabi-gdb-py --version
GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20151217-cvs
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Pierson Lee (@pieandcakes) I have same situation, I cannot pause debugger or set breakpoints while it's running.
Same log I got when I tried to pause:
C pause: {"threadId":-2}
R: {"success":true,"message":null,"request_seq":11,"command":"pause","body":null,"running":false,"refs":null,"seq":0,"type":"response"}
VS Code Version 1.17.0
OS version:
System Version: macOS 10.12.6 (16G29)
Kernel Version: Darwin 16.7.0
I tried to use following versions of arm gdb:
GNU gdb (GNU Tools for ARM Embedded Processors 6-2017-q1-update) 7.12.1.20170215-git
This GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
and
GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160923-cvs
This GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
partyzan (@partyzzzan) Can you enable "engineLogging": true in your logging block and let me know what you get back? It looks like we request to pause the debugger and the fact that you get a success message means gdb is telling us you have paused.
Setting breakpoints while running is a different issue than pausing.
Sorry Kiwi (@kiwi616), I haven't worked on it since encountering the issue - decided to give it some time, as maybe it was some intermittent issue that will get fixed. I see it's still a problem there? I will try to come back to my debugger and see if I still have the same problem.
Is there any progress on this issue? I'm working with openocd (0.10.0) and GNU gdb (GNU Tools for Arm Embedded Processors 9-2019-q4-major) and I'm having the same problem with vscode 1.43.2.
I'm seeing this on VSCode 1.49.1 using cppdbg if you start without any breakpoints and have stopAtEntry set to false.
I am able to see the CALL STACK, click on a thread, then pause via that means, or hot add a breakpoint, but it is strange behavior to not have the main pause button available.
I am having the same issue when debugging a remote embedded target. Every time I run gdb in a terminal, everything works fine, that is I can ctrl+c interrupt any time and read the registers, memory etc.. When debugging in vscode, pause button does nothing, there is no way to interrupt execution, though breakpoints work fine.
Am I doing anything wrong? Please let me know if you would like more info. This is a very crucial issue for me.
Edit: I tried with different debugger probes (jlink and stlink each has its own gdb server) and the issue persists. I think it has to do with vscode communicating to arm-none-eabi-gdb (aka arm embedded debugger).
Frankly speaking I don't know. That's really good question for the plugin development team. I suppose that plugin need to know it is remote session. If you set miDebuggerServerAddress (you can delete debugServerPath and debugServerArgs) it still works. However this solution is not enough for me, due to setupCommands are called before remote connection (the monitor commands only works with remotes).
To sum up, it isn't the correct solution, but rather workaround of issue. If you run a gdbserver on remote machine (connection via network) it fails.
BTW: Adding setupCommands to connected remote (after target remote command) would be a nice feature!
Cortex-Debug works for me too, but it's very specific with the devices it supports. The point here is that the native vscode cpptools extension should be agnostic to the flavor of the remote gdb server.
same here, cant pause program during execution nor adding breakpoints.
breakppoints which are added before program execution are recognized, then when a already added breakpoint is reached, it is possible to add other brekapoints, but once i run the programm it isnt possible to add breakpoints anymore.
when i just try to pause the running porgramm, i need to kill the task because stopping via the stop button doesnt work as well then....
Activity
pieandcakes commentedon Jun 8, 2017
Can you set breakpoints? the log looks like it paused. Does the UI look like its still running?
AlanRosenthal commentedon Jun 8, 2017
It doesn't actually pause the CPU.
I can set only set breakpoints before the debugger starts or when its already halted at another breakpoint.
This is the log when trying to set a breakpoint when the cpu isn't halted:
pieandcakes commentedon Jun 8, 2017
Alan Rosenthal (@AlanRosenthal) was this working before?
AlanRosenthal commentedon Jun 8, 2017
It was working on Windows, not on Linux.
pieandcakes commentedon Jun 8, 2017
Which version of Linux is this? it says Linux x64 generic. I have Ubuntu but I can't repro this.
AlanRosenthal commentedon Jun 8, 2017
This is the log when trying (and succeeding) to set a breakpoint when the cpu IS halted:
AlanRosenthal commentedon Jun 8, 2017
AlanRosenthal commentedon Jun 8, 2017
pieandcakes commentedon Jun 8, 2017
I'll have to see if I can find an arm Linux device here so I can test this.
AlanRosenthal commentedon Jun 8, 2017
in case you need my launch.json: #792 (comment)
pieandcakes commentedon Jun 8, 2017
Alan Rosenthal (@AlanRosenthal) thanks
partyzzzan commentedon Oct 11, 2017
Pierson Lee (@pieandcakes) I have same situation, I cannot pause debugger or set breakpoints while it's running.
Same log I got when I tried to pause:
VS Code Version 1.17.0
OS version:
I tried to use following versions of arm gdb:
and
launch.json:
pieandcakes commentedon Oct 12, 2017
partyzan (@partyzzzan) Can you enable
"engineLogging": truein your logging block and let me know what you get back? It looks like we request to pause the debugger and the fact that you get a success message meansgdbis telling us you have paused.Setting breakpoints while running is a different issue than pausing.
10 remaining items
noizex commentedon Apr 23, 2019
Sorry Kiwi (@kiwi616), I haven't worked on it since encountering the issue - decided to give it some time, as maybe it was some intermittent issue that will get fixed. I see it's still a problem there? I will try to come back to my debugger and see if I still have the same problem.
duddie commentedon Oct 29, 2019
Hi, has anyone sorted it out?
mguc commentedon Apr 7, 2020
Is there any progress on this issue? I'm working with openocd (0.10.0) and GNU gdb (GNU Tools for Arm Embedded Processors 9-2019-q4-major) and I'm having the same problem with vscode 1.43.2.
pieandcakes commentedon Apr 8, 2020
Andrew Wang (@WardenGnaw) Please review.
eurijk commentedon Sep 23, 2020
I'm seeing this on VSCode 1.49.1 using cppdbg if you start without any breakpoints and have stopAtEntry set to false.
I am able to see the CALL STACK, click on a thread, then pause via that means, or hot add a breakpoint, but it is strange behavior to not have the main pause button available.
stansotn commentedon Oct 22, 2020
I am having the same issue when debugging a remote embedded target. Every time I run gdb in a terminal, everything works fine, that is I can ctrl+c interrupt any time and read the registers, memory etc.. When debugging in vscode, pause button does nothing, there is no way to interrupt execution, though breakpoints work fine.
Am I doing anything wrong? Please let me know if you would like more info. This is a very crucial issue for me.
Edit: I tried with different debugger probes (jlink and stlink each has its own gdb server) and the issue persists. I think it has to do with vscode communicating to arm-none-eabi-gdb (aka arm embedded debugger).
vscode version
launch file
lkrzysciak commentedon Oct 22, 2020
Add to launch.json file debugServerPath and debugServerArgs parameters in order to run gdb server with the plugin. I had the same issue before that.
My launch.json file
It was tested with arm-none-eabi-gdb debugger as well.
stansotn commentedon Oct 23, 2020
@lukas9409 Amazing! Thank you, it works! What's wrong with running the gdb server in a separate terminal?
lkrzysciak commentedon Oct 23, 2020
Frankly speaking I don't know. That's really good question for the plugin development team. I suppose that plugin need to know it is remote session. If you set miDebuggerServerAddress (you can delete debugServerPath and debugServerArgs) it still works. However this solution is not enough for me, due to setupCommands are called before remote connection (the monitor commands only works with remotes).
To sum up, it isn't the correct solution, but rather workaround of issue. If you run a gdbserver on remote machine (connection via network) it fails.
BTW: Adding setupCommands to connected remote (after target remote command) would be a nice feature!
biboc commentedon Mar 26, 2021
I made it work by using Cortex-Debug 0.3.12 extension.
The extension launch gdb server as well, it is the same as @lukas9409 mentioned earlier
Here is my launch.json if it can help:
Play/Pause works
stansotn commentedon Mar 27, 2021
Cortex-Debug works for me too, but it's very specific with the devices it supports. The point here is that the native vscode cpptools extension should be agnostic to the flavor of the remote gdb server.
lygstate commentedon Jun 24, 2021
Also faced this annoy bug on win32/mingw
It's seems the cppdbg didn't implement pause instruction properly.
ThoSe1990 commentedon Jul 7, 2021
same here, cant pause program during execution nor adding breakpoints.
breakppoints which are added before program execution are recognized, then when a already added breakpoint is reached, it is possible to add other brekapoints, but once i run the programm it isnt possible to add breakpoints anymore.
when i just try to pause the running porgramm, i need to kill the task because stopping via the stop button doesnt work as well then....
ms-vscode.cpptools v1.4.1
Edit: probelm occured on windows.
seppeon commentedon Dec 14, 2021
Yeah, same here, with mingw.