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?
This should actually be possible in NCS using custom debugger settings as explained here:
To attach to a running process, the request field must be set to attach.
Hope this helps, best regards,
Einar
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.
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.
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.