Use a GUI debugger for VSCode and gdbStub (idf monitor)

brazoayeye
Posts: 44
Joined: Sun May 03, 2020 2:37 pm

Use a GUI debugger for VSCode and gdbStub (idf monitor)

Postby brazoayeye » Tue Feb 04, 2025 10:47 am

Hello,

i'm using latest esp-idf and vsCode and its extension to build and flash software.
I don't have a JTAG interface but I read I can enable ESP_SYSTEM_GDBSTUB_RUNTIME to debug using program serial.

I did that, now when i click Ctrl+C in "idf monitor" (automatically started by VSCode using the command
"ESP-IDF: Build Flash and Start a Monitor on your Device"
it works and I can see (gdb) on the terminal.

I can manually set breakpoint file:row , continue, print and so on but it's very slow and I would like to have it directly on VSCode (Watch, variables, breakpoints, etc)

Is it possible?
I googled and tried many things but they all seems to be done for JTAG.

PS: I tried the command
"Launch IDF Monitor for Core Dump Mode/GDB Stub Mode"

but I have this error when I click CTRL-C on idf montior:
$T0b#e6--- Communicating through WebSocket
--- WebSocket sent: {'event': 'gdb_stub', 'port': '/dev/ttyUSB0', 'prog': '/home/user/Desktop/ws/myProj/build/myProj.elf'}
--- Waiting for debug finished event
--- Error: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
--- Waiting for the device to reconnect
--- Error: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Thanks

PETERESP
Posts: 9
Joined: Mon May 25, 2026 7:45 am

Re: Use a GUI debugger for VSCode and gdbStub (idf monitor)

Postby PETERESP » Sat Jul 11, 2026 1:29 pm

This circuit board doesn’t carry an onboard USB-JTAG interface, and it can’t link an external JTAG adapter either. Besides, the OpenOCD tool hasn’t been set up well, so only the UART0 serial port is left for use. I’m wondering if we’re still able to debug the ESP32 in this case. Would there be any workable approaches to run codes step by step, set conditional breakpoints, check variable values, or adjust memory contents?

Who is online

Users browsing this forum: No registered users and 1 guest