I am using PlatformIO IDE plugin for VS Code on Windows 10.
Yesterday and in the morning debugger was working. Then I turned off my laptop, turned it on back again hour later and now I cannot start debugging. Platformio is able to build code and upload on board (STSTM32F4 Discovery if it matters) but launching debugging session is blocked by that error.
Tried: removing .pio directory in project root, rebooting my laptop, uninstalling and installing back PlatformIO IDE plugin, running VS Code as admin, removing .platformio dir in home directory to force platformio core reinstall. Nothing changed, still the same problem.
To check if this is my application config problem I generated fresh platformio project for the board I am using. Still the same error so problem seems to be on platformio/vscode side.
The same error is thrown even if Discovery board is not connected to PC, I think that means problem is before plaformio debugger tries to connect with board
On Eclipse with SW4STM32 plugin setup on the same laptop, debugging that Discovery board is working - seems like this is not problem with my laptop OS or hardware.
I was able to reproduce problem on another Win10 laptop after fresh installation of VS Code + PlatformIO IDE
Tested on disco_f407vg, bluepill_f103c8 boards with the same result
In vscode dev console are two errors. Debug start fail, Could not start debugger process > Error: spawn platformio ENOENT is second. First error (node:8584) [DEP0005].
Can you please check if downgrading the PIO extension makes a difference. On the left sidebar -> Extensions -> PlatformIO -> Cogwheel -> Install other version -> 2.1.0 (2.0.1 also working).
I cannot help but can confirm that I have exactly the same issue. I’m debugging a Wio Terminal (ATSAMD 51P19 MCU). Up to yesterday all worked perfect. Today have the same error messages,
Looking at the commit history yesterday I noticed commit
…was removing that PlatformIO calls could be done in a normal terminal. This is a guess in the blue, but maybe it has something to do with the issue of not being able to start the debug server? Or maybe that commit interferes.
This patch is included since 2.1.1, so since extension version 2.1.0 works as reported, it’s a strong indication that that might have something to do with it.
For me on plugin 2.1.0 debugging is working.
2.1.1 - nothing works, PlatformIO Home wont even open, no build, no upload.
2.1.2 - no debugging, but build + upload are working.