Open
Description
Platform: MacOS M1, Vscode
Arduino 3.2 rc2
had the following situation several times, did not see a clear pattern why (it's not Arduino versions):
- cd to the project dir in terminal
- start VSCode with
code .
- build/flash works perfectly fine
- starting debug session - Debug Console shows: 'Could not start debugger process > Error: spawn platformio ENOENT'
It turns out that if you activate the pio python environment before starting Vscode with code .
, then debugging works fine
NB this has no effect on other aspects of the build - all working fine despite NOT activating the pio Python environment
MacBookPro networking/cores3-read-qrcode logcanvas $ pio
zsh: command not found: pio
MacBookPro networking/cores3-read-qrcode logcanvas $ source /Users/mah/.platformio/penv/bin/activate
(penv) MacBookPro networking/cores3-read-qrcode logcanvas $ pio
Usage: pio [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
...
upgrade Upgrade PlatformIO Core to the latest version
(penv) MacBookPro networking/cores3-read-qrcode logcanvas $ code .
now starting a debug session works fine, even with latest 3.2rc2
TLDR; activate the platformio Python environment before starting VSCode
Michael