platformio-vscode-ide: Debugging does not start

In the last 3 days, there has been an unusual concentration of topics about users not being able to debug. The symptoms are:

  • Debug Console empty after starting debugging
  • debugging works in the CLI when invoked via pio debug --interface=gdb -x .pioinit
  • all reports use Windows, some say on Linux it works

These topics are:

I myself am running VSCode 1.63.2 and do not have problems, some failure report say they’re running VSCode 1.64.0.

There may be a VSCode update that breaks debugging? In any case, a concentration of these reports over a small period of time is too unusual.

CC @ivankravets.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 26 (5 by maintainers)

Most upvoted comments

What is this “platformio-vscode-debug”: “~1.4.1” dependency you changed?

This is our front-end debugger for the VSCode. To fix this issue, we enabled shell=true for Node.JS ChildProcess.spawn on Windows.

I see now. is it me or are the sources not on github?

If I can make a suggestion, It would be nice if just one output/printline would be added to the “Debug Console” something like “- Starting debug session -” (maybe with the time and date) so you can see it is actually (trying) to start. It would be very helpfull for an enduser like me to determine where it cuts out. (All this time I had to figure from a disappearing progress bar and a empty “Debug Console”) If possible some more error information is always welcome 😉

Thank you for fixing this so quick! Have a nice weekend.

Hi there,

Seems like this is a problem again. My debugger is not starting.

The issue has been fixed, please update the extension to the latest version. It was not linked with Python, we reverted back the latest portable Python to 3.9.10.

The issue was linked with updated VSCode’s Node.JS and “access violation” https://github.com/nodejs/node/blob/842e5a10ac59c826f875ef79e92d144e2655cc9a/test/common.js#L502-L505

Well Ivan edited that text in, not me 😄 I’ve reverted it back.

We are working on solving this issue…

Hm no, this is still not working for me. After removing %USER_HOME%/.platformio/python3 and %USER_HOME%/.platformio/penv and %USER_HOME%/.platformio/.cache and restarting VSCode again, PlatformIO reinstalls itself with the Python 3.9.8 version and the latest PlatformIO core version, but debugging still aborts just as it previously did.

> pio system info
--------------------------  ----------------------------------------------------
PlatformIO Core             5.2.5a7
Python                      3.9.8-final.0
System Type                 windows_amd64
Platform                    Windows-10
File System Encoding        utf-8
Locale Encoding             cp65001
PlatformIO Core Directory   C:\Users\Max\.platformio
PlatformIO Core Executable  C:\Users\Max\.platformio\penv\Scripts\platformio.exe
Python Executable           C:\Users\Max\.platformio\penv\Scripts\python.exe
Global Libraries            0
Development Platforms       59
Tools & Toolchains          204
--------------------------  ----------------------------------------------------

@FaBjE does it work for you?

One thing I can say is that when I reinstall my global PlatformIO installation and don’t use the built-in interprter (PlatformIO extension settings), I’m back to being able to debug again.

grafik

I’ll use the builtin Python again now that the 3.9.10 package was removed and I’ll report back.

You need to delete the virtual environment as well. Just replacing it in the python3 folder didn’t work for me. But the PIO installer from vscode is very stubborn in using the portable python from the repository. Even when setting the “don’t use it” setting and filling the “where is python” prompt it still used the portable python it downloaded itself in my setup.

WOW, it broke.

Debugging controls (play, step into, …) briefly pops up then disappears immediately. “Terminal” shows a successfull debug build, the “Debug Console” is empty. This really breaks it.

PS C:\Users\Max\Desktop\gd32_dev\gd32-pio-projects\gd32-spl-blinky> pio system info
--------------------------  ----------------------------------------------------
PlatformIO Core             5.2.5a7
Python                      3.9.10-final.0
System Type                 windows_amd64
Platform                    Windows-10
File System Encoding        utf-8
Locale Encoding             cp65001
PlatformIO Core Directory   C:\Users\Max\.platformio
PlatformIO Core Executable  C:\Users\Max\.platformio\penv\Scripts\platformio.exe
Python Executable           C:\Users\Max\.platformio\penv\Scripts\python.exe
Global Libraries            0
Development Platforms       59
Tools & Toolchains          204
--------------------------  ----------------------------------------------------