Can't start Unified debugger in VS Code

Hi,
I have set up the PIO Unified debugger, using an ESP-PROG, to debug ESP32 projects, according to Andreas Spiess’ great Youtube video. When I do “Start debugging” in Visual Studio Code I get the following error message window (I could not attach a screen shot):

Visual Studio Code
Could not find the specified task.

The options are: “Configure task”, “Open launch.json” and “Cancel”.

I have an PlatformIO account and I have added these lines to the platformio.ini file:
debug_tool = esp-prog
debug_init_break = tbreak setup

I have added the drivers for both ports on the ESP-PROG.

My versions are:
VS Code 1.42.1
PlatformIO IDE 1.10.0
Home 3.0.1
Core 4.1.0

Any ideas on what could be the problem?

1 Like

I could be completely wrong and this not be relevant, but can you check if task auto detection is turned on (it is by default, unless VSCode was stupid and asked you to turn it off):

Many thanks for your help :slight_smile: I checked this and task detect is already “on”, so it has to be something else. Other suggestions, anyone? Does anyone know the name of the task that can’t be found in this case?

1 Like

If you go to the Deubg view, there is a green arrow at the top left of the window, labelled RUN AND DEBUG. Next to it, there is a combo box. The combo box should say PIO Debug (your project name).

Is this the case? If not, is it available in the combo box? If so, select it and press the green arrow.

3 Likes

That did the trick :smiley: After some weird behaviour (I for instance had to re-install the drivers for the ESP-PROG) I got it to work, by selecting the right project in the combo box. Brilliant @manuelbl :+1:

It happened to me also after installing ESP-IDF in VSC. Platformio debugger stopped working.
Fortunately it has an easy solution(it´s not common). Thanks for this topic!!! :slightly_smiling_face: :upside_down_face: