Debugging with ESP32 Wrover Kit

Environment: Windows 10, PlatformIO with VSCode

platformio.ini:
[env:esp_wrover_kit]
platform = espressif32
framework = espidf
board = esp-wrover-kit
monitor_speed = 115200
debug_tool = ftdi
upload_tool = ftdi

I tried the debugger using the example 190118-152452-espdif-hello-world.
The debugger is generally working but shows some strange behaviour:

  • if I single.step through the loop (line 33 to 37) variable i in the watch window is shown with the correct value (=10) only in the first cycle. In the following cycles it is shown as 0 ‘\000’, while hovering with the mouse over the source code shows the correct value.
  • Breakpoints are sometimes respected, but mostly ignored
  • Command Stop Debugging is ignored
  • sometimes I get the error message that the program counter didn’t advance after a single step command (F10)

I am quite new with platformio, so maybe I missed something.
Can somebody help ?
Thank you, Helmut

Do you have more than 2 breakpoints active? esp-idf/docs/en/api-guides/jtag-debugging/tips-and-quirks.rst at master · espressif/esp-idf · GitHub

Thank you for your quick answer. No, I have currently two breakpoints.

Are the same problems occurring when using ESP-IDF and their setup? (JTAG Debugging - ESP32 - — ESP-IDF Programming Guide latest documentation)

If yes, then it might be either a general problem with the platform or the tools; if no, then there’s a chanage in configuration between ESP-IDF and PIO.

I did not try that. I have set up PlatformIO a few days ago and these are my first steps with it. I selected this environment because of its proclaimed ease of setup and use and did not try another environment yet.

Please remove all breakpoints. Start debugging session. Do a few steps to init tasks. Now, set breakpoint in your main code and press 'CONTINUE". Does it work now?