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
Describe the bug
I use VSCode on a Windows Machine. I have setup a Devcontainer within which I debug and develop.
When I start the first Debugging session everything seems to work (First debugging session after building the devcontainer). I'm not 100% sure if I get some errors already in the console (console content posted further down).
Then I stop the debugging session and it stops as expected.
If I want to start a second debugging session I get following error message from openocd:
[2023-12-01T17:24:17.793Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
extern/start_openocd.sh -c "gdb_port 50003" -c "tcl_port 50004" -c "telnet_port 50005" -s /workspaces/hybrid-control-unit/extern/ -f /home/vscode/.vscode-server/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl -f /usr/share/openocd/scripts/interface/stlink.cfg -f /usr/share/openocd/scripts/target/stm32h7x.cfg
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
CDLiveWatchSetup
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : Listening on port 50004 for tcl connections
Info : Listening on port 50005 for telnet connections
Info : clock speed 1800 kHz
[2023-12-01T17:24:17.862Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
When I check with "top" I can see there is still a openocd process running. If I kill it, it works as expected.
If I click "Reset" or "Restart" everything also works as expected (in the debug console)
To Reproduce
Steps to reproduce the behavior:
See above
Expected behavior
OpenOCD process should be stopped and I can start a second debug session.
Screenshots
Environment (please complete the following information):
VSCode Version: 1.84.2
Cortex-Debug Version (this extension): v1.12.1
OS: Win11 -> Docker (Devcontainer) in WSL2 Backend
GDB Version: GNU gdb (Debian 13.1-3) 13.1
Compiler Toolchain Version: gcc version 12.2.1 20221205 (15:12.2.rel1-1)
I use usbipd to forward the USB port to the WSL and then I use the privileged option to use the usb ports within the dockercontainer.
I use a user inside the devcontainer because I had issues with git when using root to commit everything.
Therefore I have to use a start_openocd.sh script which starts openocd for me as sudo. Maybe this is the issue?
#!/bin/sh
sudo openocd "$@"
Please include launch.json
Note: We are unlikely to look at the issue if you do not supply this
As already stated above the user within the devcontainer is my issue.
As stated above:
I use a user inside the devcontainer because I had issues with git when using root to commit everything.
Therefore I have to use a start_openocd.sh script which starts openocd for me as sudo. Maybe this is the issue?
#!/bin/sh
sudo openocd "$@"
I rebuild the docker image with root and used the root user in the devcontainer and it worked out of the box.
Do you know of any way to start the openocd server within the devcontainer with sudo?
I think you could close this issue, as I feel this is an issue how I have set it up. But I'm also happy if I get some feedback whats the best setup for a devcontainer on windows and debugging.
Thanks for all your great work! And sorry for bothering
Describe the bug
I use VSCode on a Windows Machine. I have setup a Devcontainer within which I debug and develop.
When I start the first Debugging session everything seems to work (First debugging session after building the devcontainer). I'm not 100% sure if I get some errors already in the console (console content posted further down).
Then I stop the debugging session and it stops as expected.
If I want to start a second debugging session I get following error message from openocd:
When I check with "top" I can see there is still a openocd process running. If I kill it, it works as expected.
If I click "Reset" or "Restart" everything also works as expected (in the debug console)
To Reproduce
Steps to reproduce the behavior:
See above
Expected behavior
OpenOCD process should be stopped and I can start a second debug session.
Screenshots
Environment (please complete the following information):
I use usbipd to forward the USB port to the WSL and then I use the privileged option to use the usb ports within the dockercontainer.
I use a user inside the devcontainer because I had issues with git when using root to commit everything.
Therefore I have to use a start_openocd.sh script which starts openocd for me as sudo. Maybe this is the issue?
Please include
launch.json
Note: We are unlikely to look at the issue if you do not supply this
Attach text from
Debug Console
This is when it does not work:
This is when it works:
Additional context
I found following ticket which seems to be a similar / the same problem, but I couldnt find a solution for myself.
#493
The text was updated successfully, but these errors were encountered: