I have some code that works fine from the debugger, but does not run without the debugger. I would like to attach the debugger to see what is going on. However, I don't see an option in VSCode to attach to a running process? How is that done?
I have some code that works fine from the debugger, but does not run without the debugger. I would like to attach the debugger to see what is going on. However, I don't see an option in VSCode to attach to a running process? How is that done?
Einar, I followed the steps to add a configuration with the "attach" request. It does indeed attach to a running process. However, none of the symbols are loaded so no call stacks are visible and no source code debugging. Is there a way to set this up so that the debugger is setup (symbols loaded, etc) for whatever the current application is in the nrf connect extension "Applications" view?
Seems like what you are describing here isn't expected behavior.
Could you provide some logs, especially the address space where you are stuck and the partition layout of the build?
Maybe the specific attach functionality does not load all the .elf files in the build.
The attach mode does not seem to automatically load the debug info from the elf. If I manually load then I can debug. Is that a bug? Seems like the nRF VSCode extension should also have an "Attach" button (similar to the "Debug" button) that does all this automatically.
Here is what I have in launch.json using a post attach command:
Has any progress been made with this issue?
There is this from 10 months ago:
new nRF Debug in VSCode does not seem to support attach?
So as far as I know it should be working.
If you're still having issues please post a new ticket rather than posting in this old one.