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?
Hello!
As far as I know this is not possible, as you'll have to start the program in debug mode in order to use the debugger.
But the fact that your code works in debug mode is a good lead towards figuring out what's wrong. I would assume the issue has to do with power or clock configurations, as these are very different when running in debug mode.
What exactly is your code supposed to do that isn't working?
Best regards,
Einar
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:
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: