Open nojas15 opened 11 months ago
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.
https://github.com/Marus/cortex-debug/issues/493