Problems with "Enable debug options"

Hi,

I am facing a problem with the selection "Enable debug options" when creating a build configuration. I use nRF connect SDK 1.9.1 with VSCode. I create an application from sample aws_iot. Then I make two different build configurations, one with "Enable debug options" checked, and one with the option unchecked. The one that has debug option enabled is not possible to debug (it may work once, but all other debug sessions do not work). But the one that doesn't have the option enabled works fine to debug.

How come there is a difference?

What does "Enable debug options" provide?

Best regards,
Lars

Parents Reply Children
  • Hi,

    In all tests I have a breakpoint on the first printk() in main():

    printk("The AWS IoT sample started, version: %s\n", CONFIG_APP_VERSION);

    When it comes to the build conf where debug options are enabled, I also tested to set a breakpoint on the row in file nrf_wdt.h where the debug session starts for build conf where debug options are disabled.

    Best regards,

    Lars

  • Hi Lars,

    This is the way how debugging worked for me:
    1. On the side bar click on Triangle symbol and then click on "Run and Debug"
    2. In the Select debugger pop-up window choose nRF Connect
    3. choose your default configuration to debug
    4. choose a device to debug on
    For both build configurations (with and without debug options enabled) breakpoint has been reached at the line 497 in main.c.

    Best regards,
    Dejan

Related