nRF9160 VSCode examples don't run properly

I am having a problem with all of my projects compiled with VSCode NCS 2.2.0:

I understand that one of the COM ports (I'm on Windows) should send output. When I flash the Asset Tracker sample to my Thingy:91, it works fine. There is terminal output, and I can send AT commands and see responses.

However, when I follow the instructions to import the AT_Client sample in VSCode, build for the thingy91_nRF9160_ns, and flash, there is no terminal output in LTE Link Monitor on any terminal. If I Debug, the debugger never gets to main(). If I pause it, it is usually here:

Does anyone know why this would happen? I have tried putting breakpoints in main(), but they are never hit.

I am debugging a Thingy91 with a SEGGER J-link Plus probe. The hello_world worked once, last week, before re-flashing with demo samples, and now no VSCode projects work properly.

I have erased with J-flash lite, nRF Connect Programmer, and VSCode, to no avail. There are no error messages in the build or debug session.

I can flash the .hex samples and they work fine.

The debugger runs and is running. It does not break at main(). If I click Pause, it is usually here:

It may be getting stuck in some sort of bootloader image validation. Sometimes if I pause, it is in checks in a function called main that is not my main:

This happens whether or not I have Debug Options checked in the build.

Any ideas?

Related