-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot pause debugger on Linux #807
Comments
Can you set breakpoints? the log looks like it paused. Does the UI look like its still running? |
It doesn't actually pause the CPU. This is the log when trying to set a breakpoint when the cpu isn't halted:
|
@AlanRosenthal was this working before? |
It was working on Windows, not on Linux. |
Which version of Linux is this? it says Linux x64 generic. I have Ubuntu but I can't repro this. |
This is the log when trying (and succeeding) to set a breakpoint when the cpu IS halted:
|
|
|
I'll have to see if I can find an arm Linux device here so I can test this. |
in case you need my launch.json: #792 (comment) |
@AlanRosenthal thanks |
@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
I tried to use following versions of arm gdb:
and
launch.json:
|
@partyzzzan Can you enable Setting breakpoints while running is a different issue than pausing. |
@pieandcakes See, here I clicked "pause" 3 times and "stop" 1 time - nothing happened:
|
This log I get if I click "stop" when code execution paused on "main" breakpoint:
|
@partyzzzan I'm looking for an actual pause command to be sent to gdb. I don't see it (should start with @robotdad @paulmaybee Do either of you know why this would be an issue? I don't have enough experience with arm gdb or openocd to know if this is a known issue or if there is a tweak necessary to make it work. |
Yes, that is what I am writing about. Same situation with "stop" and "setBreakpoints" commands: they are working while code is paused, gdb log is there, everything looks good. But if i press continue - nothing works, no gdb log, no real actions, nothing. That is why I post my logs of "stop" command in 2 cases: on pause and during code execution. |
Did you guys solve this issue? I'm encountering it now, cannot pause debugger or set breakpoints while it's running. I'm using arm-none-eabi-gdb too and my logs are exactly the same as @partyzzzan. |
@pieandcakes I'm hitting a bug where I can't pause in the debugger, but I can set/hit breakpoints (I sent an email about it last week). |
@sean-mcmanus For your issue I responded to your email. It is a VS Code issue. microsoft/vscode#62085 . @TonyHoang94 If you are using VS Code 1.28.2 it might be the same issue. |
I'm developing my own Debug Adapter and I've run into the same issue - clicking Pause after running the debugger does nothing - it never reaches Setting breakpoints works. It seems like VS gets into some undefined state where UI is not adjusted correctly to what I'd expect from the events that I call... |
@noizex Yea, I filed an issue with VS Code to investigate as this isn't our extension's issue. |
Did you guys solve this issue? My logs are nearly the same as @partyzzzan with vsc Version 1.33.1 |
Sorry @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. |
Hi, has anyone sorted it out? |
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. |
@WardenGnaw Please review. |
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). vscode version
launch file"version": "0.2.0",
"configurations": [
{
"name": "debug",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/Debug/bin/windrider.elf",
"miDebuggerPath": "/Applications/ARM/bin/arm-none-eabi-gdb",
"cwd": "${workspaceRoot}",
"MIMode": "gdb",
"externalConsole": true,
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Connect to gdb server",
"text": "target remote localhost:61234"
},
{
"description": "load executable",
"text": "file ${workspaceRoot}/build/Debug/bin/windrider.elf"
},
{
"description": "Flash Firmware, Reset and Halt Target",
"text": "load"
},
]
}
] |
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. |
@lukas9409 Amazing! Thank you, it works! What's wrong with running the gdb server in a separate terminal? |
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! |
I made it work by using Cortex-Debug 0.3.12 extension. Here is my launch.json if it can help:
Play/Pause works |
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. |
Also faced this annoy bug on win32/mingw |
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. |
Yeah, same here, with mingw. |
Steps to Reproduce:
Log from DEBUG CONSOLE:
Clone of microsoft/vscode#28246. Wasn't sure which repo was appropriate for this ticket.
The text was updated successfully, but these errors were encountered: