AVR stub setup with atmega328p

Once you start the debugging, it should stop at the first breakpoint you set (or inside the function that you set the breakpoint at). If I e.g. set a breakpoint in my referenced setup post at delay(), after pressing “Debug”, VSCode looks like

Which is inside delay() where I set the original breakpoint

If I use your main.cpp code with no manually set breakpoints, it will stop at the breakpoint() function

So I can’t reproduce the “infinite loading” issue.

Also, the bebavior I see on my Uno when starting “Debug” is:

  • Code is built
  • Code is uploaded (lights “TX” and “RX” stay on for a bit)
  • TX light stays on for a bit
  • All lights off
  • Code is uploaded again (TX / RX LEDs on)
  • VSCode loading stops and the breakpoint is hit

What is the action that you’re seeing?

There could be just general setup errors e.g. regarding VSCode (conflicting extensions installed), or the extension itself. (I use the beta version at PlatformIO IDE for VSCode 2.3 Beta – Help us with testing!, has a few bugs regarding the “General” project task dropdown but is ok otherwise). Or a problem with board upload.