I'm struggling to get started with ESP-PROG debugging

As a new user I’m having some trouble debugging an ESP32-WROOM-32 with ESP-PROG.
I can build, upload and monitor various projects OK.

I’ve followed the document: Get started with ESP-IDF and ESP32-DevKitC: debugging, unit testing, project analysis — PlatformIO latest documentation

and Brian Lough’s document: Use the PlatformIO Debugger on the ESP32 Using an ESP-prog - Hackster.io

Whenever I attempt to run the debugger:
The debug toolbar is displayed with reset and stop options enabled only.
The project builds in debug mode, compiles links etc and shows [SUCCESS] Took 12.20 seconds
The debug toolbar is no longer displayed.
Nothing else happens. No breakpoints hit, no messages, nothing.

Some other clues:

For the commands build, upload etc. a toast message is displayed:
There are task errors. See the output for details.

The OUTPUT tab of the Terminal shows the message:
Error: The PlatformIO task detection didn’t contribute a task for the following configuration:
{
“type”: “PlatformIO”,
“task”: “Pre-Debug”,
“problemMatcher”: [
“$platformio”
],
“label”: “PlatformIO: Build in debug mode”
}
The task will be ignored.

The DEBUG CONSOLE tab of the Terminal always shows the message:
Could not start debugger process > Error: spawn platformio ENOENT

Does anyone have any suggestions?

  • full platformio.ini and sketch code?
  • list of installed VSCode extensions?
  • PIO extension is the latest version?
  • VSCode is the latest version?
  • output of pio system info in a CLI?

; PlatformIO Project Configuration File
;
; Build options: build flags, source filter, extra scripting
; Upload options: custom port, speed and extra flags
; Library options: dependencies, extra library storages
;
; Please visit documentation for the other options and examples
; Redirecting...

[env:mhetesp32devkit]
platform = espressif32
board = mhetesp32devkit
framework = arduino
monitor_speed = 115200
;upload_port = COM5
debug_tool = esp-prog
debug_init_break = tbreak setup

VSCode Extensions:
austin.code-gnu-global
cschlosser.doxdocgen
ecmel.vscode-html-css
firefox-devtools.vscode-firefox-debug
formulahendry.code-runner
GitHub.vscode-pull-request-github
googlecloudtools.cloudcode
jeff-hykin.better-cpp-syntax
mindaro-dev.file-downloader
mindaro.mindaro
ms-azuretools.vscode-docker
ms-dotnettools.csharp
ms-kubernetes-tools.vscode-kubernetes-tools
ms-python.python
ms-toolsai.jupyter
ms-vscode-remote.remote-containers
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode-remote.remote-wsl
ms-vscode.azure-account
ms-vscode.azurecli
ms-vscode.cmake-tools
ms-vscode.cpptools
ms-vscode.cpptools-extension-pack
ms-vscode.cpptools-themes
ms-vscode.notepadplusplus-keybindings
ms-vsliveshare.vsliveshare
platformio.platformio-ide
redhat.vscode-commons
redhat.vscode-yaml
tht13.html-preview-vscode
twxs.cmake
PlatformIO version:

  • Core 5.2.0a6
  • Home 3.3.4

VSCode about:
Version: 1.57.1 (system setup)
Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
Date: 2021-06-17T13:28:07.755Z
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.19043

I’m sorry I don’t know how or where to run “pio system info” - not recognised in any terminal.

pio system info:


PlatformIO Core 5.2.0a6
Python 3.9.2-final.0
System Type windows_amd64
Platform Windows-10
File System Encoding utf-8
Locale Encoding cp1252
PlatformIO Core Directory C:\Users\andiarc.platformio
PlatformIO Core Executable C:\Users\andiarc.platformio\penv\Scripts\platformio.exe
Python Executable c:\users\andiarc.platformio\penv\scripts\python.exe
Global Libraries 0
Development Platforms 1
Tools & Toolchains 18


Well that’s definitely a problem. You did follow the doc link to open a PIO terminal? Also accessible in the PIO sidebar

I guessed that not being able to execute pio in the CLI is a conflicting extension messing with the PATH environment variable or Python environment. Usually a sign of the Anaconda extension, but you don’t have that installed.

That extension is known to break PlatformIO per Investigate incompatibility with Google Cloud Code extension · Issue #2481 · platformio/platformio-vscode-ide · GitHub. That’s the first extension that should be deactivated.

If that’s the Austin C++ IntelliSense extension, that’s also known to conflict with PlatformIO.

If that still does not help, reduce the installed extension to just PlatformIO, C/C++ by Microsoft, Python and Jupyter.

Thank you @maxgearhardt, I am now debugging. :smiley:

I uninstalled all extensions except:
ms-vscode.cpptools
ms-vscode.cpptools-extension-pack
platformio.platformio-ide

I still get the toast message and the error in the OUTPUT tab, but the DEBUG CONSOLE tab now has some activity. I’ve had a few false starts, just need more practice.

Thanks again.