Debug Your Project
Each ESP-IDF project has a single ESP-IDF Application launch configuration that is used for both running (building and flashing) and debugging. You do not need to create a separate debug configuration. The Launch Mode selected in the launch bar (the first dropdown) determines what the configuration does and which settings are shown when you edit it:
Runmode: build, flash, and serial settings (Build Settings,Main,Environment, andCommontabs).Debugmode: OpenOCD and GDB settings (Main,Debugger,Startup,Source,Common, andSVDtabs).
Note
If you’re using Windows, you may need to install drivers using Zadig to run a debug session successfully. For detailed instructions, please refer to this guide.
In most cases, you only need to check that the board specified in the configuration matches the board you are using:
Select your project’s configuration from the second dropdown in the launch bar.
Select
Debugfrom the Launch Mode dropdown.Click on the
Edit(gear) icon next to the configuration.In the
Debuggertab, check that theBoardandConfig optionsmatch your board, then clickOK.
Important
Debug settings can only be edited while the Launch Mode is set to Debug, and run settings (such as flash arguments or the build folder) can only be edited while it is set to Run. If you do not see the tab you are looking for, switch the mode and open the configuration editor again.
To learn more about the debug settings, please refer to ESP-IDF OpenOCD Debugging.
