I'm old for s/w and h/w but new and confused with Arduino
I'm trying to debug UNO R4 WIFI but the debugger gives up w/o any error message:
Open On-Chip Debugger 0.11.0+dev-gab95bac57-dirty (2021-05-11-10:45)
Licensed under GNU GPL v2
For bug reports, read OpenOCD: Bug Reporting
CDRTOSConfigure
swd
adapter speed: 1000 kHz
Info : Listening on port 50001 for tcl connections
Info : Listening on port 50002 for telnet connections
[2025-10-15T09:54:09.567Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
Debug console says something that worries me (maybe unrelated, strange that old junk is still in the libraries):
WARNING: Cortex-Debug will deprecate use of GDB version 8 after July 2022. Please upgrade to version 9+
Reading symbols from C:/Users\roman\AppData\Local\arduino\sketches\CA49C7776FD68392BE9E2CBF25BB743D\WiFiWebClient.ino.elf...done.
OpenOCD: GDB Server Quit Unexpectedly. See gdb-server output for more details.
GDB never responded to an interrupt request. Trying to end session anyways
Any clue how to fix it?
Running w/o debugger works for simpler sketches (but not for WiFiWebClient).
I have a lot of different boards and help out a lot here but have never used the debugger because serial.print is all I normally need.
Can you explain what the original WiFi bug is so we can try to resolve that without getting the 'debugger' involved?
Iām trying to get wifi client working, but cannot see any printouts so the next step was to get into the debugger, that I would like also to get running.
This makes it difficult to understand what might be causing the problem. I can cause the debugger to fail to start in various ways, but all of those produce an error message (e.g., Error: unable to find a matching CMSIS-DAP device).
Do you ever see any more output than that when you attempt to start the debugger? I am wondering if maybe the output you saw was just from one session during which the debugger was in a strange state that caused it to not print the error message.
Try this experiment:
Select File > Examples > 01.Basics > BareMInimum from the Arduino IDE menus.
A minimal sketch will open in an Arduino IDE window.
Upload the sketch to your UNO R4 WiFi board, as usual.
Wait for the upload to finish successfully.
Click the "Start Debugging" button on the Arduino IDE toolbar.
Does the debugger fail to start when the board is running that "BareMInimum" sketch?
The experiment is intended to determine whether the problem might be caused by some conditions that are only produced when the board is running the "WiFiWebClient" sketch.
It is unrelated.
The "Cortex-Debug" mentioned in the warning message is referring to the VS Code extension that is used by the Arduino IDE sketch debugger. That extension is bundled with the Arduino IDE application, so the Arduino IDE developers have complete control over which version of the extension is used by Arduino IDE. They will not update the extension to a version that is incompatible with the version of GDB used by the official Arduino boards platforms such as the "Arduino UNO R4 Boards" platform of the UNO R4 WiFi board. They will instead wait until the platforms are updated to use a newer version of GCC. So the lack of compatibility between newer versions of the Cortex-Debug extension and older GDB versions is something that will not affect us any time soon, and even when it does occur it will only affect users of outdated versions of the official boards platforms (and perhaps some 3rd party platforms that have debugger support but are still using older GCC versions).
This is nothing for you to worry about. Please just ignore the warning.
Please provide a detailed description of what you mean by "cannot see any printouts".
That information might provide a clue about what is causing the problem with the debugger, and also might allow the forum helpers to assist you with finding the cause of the problem with the Wi-Fi client.
I tried the BareMinimum sketch and it is the same. Gdb-server output:
Waiting for gdb server to start...[2025-10-19T13:41:18.034Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
"C:\Users\roman\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.11.0-arduino2/bin/openocd" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "c:\Users\roman\AppData\Local\Temp\.arduinoIDE-unsaved2025919-41144-10alq48.mq4v\BareMinimum" -f "C:/Users/roman/AppData/Local/Programs/Arduino IDE/resources/app/plugins/cortex-debug/extension/support/openocd-helpers.tcl" -f interface/cmsis-dap.cfg -f "C:\Users\roman\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.5.1/debugger/select_swd.cfg" -f "C:\Users\roman\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.5.1/debugger/R7FA4M1AB.cfg"
Open On-Chip Debugger 0.11.0+dev-gab95bac57-dirty (2021-05-11-10:45)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
CDRTOSConfigure
swd
adapter speed: 1000 kHz
Info : Listening on port 50001 for tcl connections
Info : Listening on port 50002 for telnet connections
[2025-10-19T13:41:18.117Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
I have seen the same error described, and @ziriax got it working:
Unfortunately I do not really follow him on using latest version of openocd.exe - is openocd an integrated module in Arduino IDE that could be replaced, or or is he running it as another standalone application?
The printouts I cant see when running w/o debugger are like:
Serial.println("Communication with WiFi module failed!");
Luckily I just discovered the Tools/Serial Monitor - and the printouts were there.