nRF Academy Intermediate Course - Lesson 1 Exercise 1: Issue with Debugging

Hello,

I tried following the exercise until the part where you start a debugging session. I looked at the thread viewer and the result was different than what was on the exercise. The picture below shows that the running thread is the idle thread instead of the main thread. Execution is supposed to break by default at main(). I tried manually putting a breakpoint in the main function but it didn't work either.

After that I tried changing the build configuration and unchecked "Include debug thread information". Somehow this fixed the problem. The result I'm getting in the thread viewer matches what's on the exercise. I can still see the thread names and stack usage even with the "Include debug thread information" unchecked.

Edit: I continued the exercise and am unable to see the details of the message queue in the watch list like in the exercise. Could this be because I unchecked "Include debug thread information"?

Parents
  • Hello,

    I suspect that the behavior you are seeing is based on what you selected when you clicked "start debug session". Can you plaese let me know, right before you click "Debug", Did you use the build folder, or the application name below that?

    Which one of the red arrows was selected?

    And after you changed your build configuration, was the application built again? And was it flashed again?

    Best regards,

    Edvin

  • Hello Edvin,

    I used the application name below the build folder (bottom red arrow) when I started the debugging session and I also do the same for flashing. Is there a difference between using one vs the other? 

    I right click the build folder, remove the build configuration and make another one. Sometimes if I just edit the build configuration it will keep telling me to do a pristine build even after doing a pristine build already. I don't know what's causing this so I just remove the build config and make a new one if I want to make changes.

    For this exercise, I usually just press debug without flashing after making changes. Although at some point I did try flashing first before using the debugger but I didn't notice any difference.

    Thank you

  • Ok. Is it possible to zip and upload the application you are testing with, so that I can try to reproduce what you are seeing? And what NCS version are you using?

    Best regards,

    Edvin

  • I was able to get the threads to run correctly with "Include debug thread information" checked. VS Code gave me a prompt to update the Segger J-Link debug probe and it might have solved the issue. 

    I'm still unable to see what's inside the message queue when I add it to the watch list.

    I'm actually using the l1_e1_sol for this one which I took from https://github.com/NordicDeveloperAcademy/ncs-inter 

    I made no changes to it and just build, erase and flash, and then run the debugger but I still can't see inside the message queue from the watch list. Here is the build configuration I used.

    I'm using NCS version 3.4.1 although I had the same problem with version 3.4.0. The board I'm using is an nRF54L15 DK.

    Edit: I tried using an nRF52840 DK and still have the same exact problem.

Reply
  • I was able to get the threads to run correctly with "Include debug thread information" checked. VS Code gave me a prompt to update the Segger J-Link debug probe and it might have solved the issue. 

    I'm still unable to see what's inside the message queue when I add it to the watch list.

    I'm actually using the l1_e1_sol for this one which I took from https://github.com/NordicDeveloperAcademy/ncs-inter 

    I made no changes to it and just build, erase and flash, and then run the debugger but I still can't see inside the message queue from the watch list. Here is the build configuration I used.

    I'm using NCS version 3.4.1 although I had the same problem with version 3.4.0. The board I'm using is an nRF54L15 DK.

    Edit: I tried using an nRF52840 DK and still have the same exact problem.

Children
No Data
Related