Page 1 of 1

Question on Debugging tutorial

Posted: Sun Jul 25, 2021 9:49 pm
by jmporter34567
Hi, this question is specific to the Debugging tutorial at:
https://github.com/espressif/vscode-esp ... bugging.md

I've built the blink example, connected the ESP-Prog to my target, set the idf.openOCDConfigs settings and flashed the target successfully using JTAG (View->Command Palette...->ESP-IDF: Flash (with JTAG). The program produces the expected output when connected to a Serial monitor.

Now, back to the Debugging tutorial:
"3. With the blink example folder open in your visual studio code window, press F5. Several steps will be automatically done for you..."

When I do that, I get a "Select Environment" popup that shows "C++ (GDB/LLDB)" and "C++ (Windows)" and "Install an extension for C" as the three choices. The tutorial does not mention this. What is the correct action to take here ?
Thanks

Re: Question on Debugging tutorial

Posted: Tue Jul 27, 2021 10:32 am
by ESP_bignacio
You opened the debug tutorial but didn't mention how you created the blink example project.

Did you create the blink example following https://github.com/espressif/vscode-esp ... sic_use.md ?

This pop up happens because your project doesn't define a launch.json for ESP-IDF (which is included when you create a project using extension command as mentioned in the basic use tutorial). As per Visual Studio Code documentation, the launch.json file defines the debug session for a given project.

There is a way to add launch.json and other vscode configuration files without recreating the project by using the Add vscode configuration folder command.

Re: Question on Debugging tutorial

Posted: Tue Jul 27, 2021 1:00 pm
by jmporter34567
I didn't create the blink example. In VS Code I just opened the folder where the included blink example already was ("C:\Espressif\esp-idf\examples\get-started\blink" in my case). I'll go back and try your suggestion "following https://github.com/espressif/vscode-esp ... sic_use.md". And verify that I've got a launch.json as well. Thanks for the help, I've been doing embedded for a while but still fairly new to both VS Code and ESP32.

Re: Question on Debugging tutorial

Posted: Tue Jul 27, 2021 4:39 pm
by jmporter34567
It works great now. Thanks!