Monitor Mode - Debugging BLE application on nRF52840 DK

I am trying to debug a BLE application on the nRF52840 DK. From what I understand, this must be done in monitor mode.

I have followed these steps:

1) added these lines to prf.conf:

CONFIG_DEBUG_OPTIMIZATIONS=y

CONFIG_DEBUG_THREAD_INFO=y
CONFIG_CORTEX_M_DEBUG_MONITOR_HOOK=y
CONFIG_SEGGER_DEBUGMON=y
2) changed build configuration optimisation level to "-Og".
3) initiated Debug session from nRF Connect for VS Code extension.
4) Entered command "-exec monitor exec SetMonModeDebug=1" into Debug Console.
5) Pressed "continue", let code run.
6) Connected to DK using nRF Connect for iOS. This is succesful.
7) Paused code execution. DK immediately disconnects.
Is there a way to ensure the DK remains connected during debugging? I am trying to debug a problem that occurs during notification.
Parents Reply Children
No Data
Related