I am developing on a custom board nRF5340 using an external J-Link Base Classic in VSCode nRF Connect SDK 2.0.0. I am using macOS 13.4.1. After months of being able to debug without issue, I now am having issues getting the debugger to work. Flashing always works fine, and the application runs as expected. When selecting Debug, the terminal indicates everything has loaded successfully and I see the Debug bar in VSCode, but main() breakpoint is never hit and the Debug bar shows a pause button as if it is running. Trying to hit the pause button does nothing. Here is the Debug Console output:
The IDE will sit like this indefinitely. That is, until I found that by merely opening up the nRF Connect for Desktop Programmer application, the main() breakpoint is immediately hit. At that point, I am able to step and set breakpoints as expected. The Debug Console output is amended with the following:
This is okay as a workaround, but I'm eager to find a long-term solution as to why this occurs. I've tried deleting my Segger tools installation and re-installing (the universal version, as per the Nordic installation guide), and upgraded the probe firmware using JLinkConfig, to no avail. I also have a nRF5340 DK, and I do NOT experience the same issue debugging when using the on-board debugger; I tried using the external J-Link probe on the DK (instead of the on-board debugger), and I DO encounter the debugging issue. So it appears localized to either the external J-link probe or its interaction with my PC.
Thanks in advance for any insights!