forked from arduino/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 5
How to debug using the Arduino IDE(Linux)
MikiyaKobayashi edited this page Aug 7, 2025
·
2 revisions
- This page describes how to perform debugging in the Arduino IDE.
- The following explanation assumes that the sketch you want to debug has already been created and compiled.
- If this preparation has not been completed, please refer to the Quick Start Guide first.
- Debugging is performed using Serial communication, so sketches that use Serial communication may not function correctly for debugging.
- If debugging does not work properly, please either disable the code that performs Serial communication by commenting it out, or change the port used for Serial communication.
- Serial (RxD0, TxD0) is used for debugging.
- If debugging does not work properly, please either disable the code that performs Serial communication by commenting it out, or change the port used for Serial communication.
- Please install the following on your PC:
- Python 3.10
- New curses library version 5
※Please refer 4.2 Installing the Required Libraries
- The operating environment at the time this guide was created is as follows:
- Arduino IDE: v2.3.6
- RL78/G23-64p FPB Arduino Library: v2.5.0
- In the Arduino IDE editor, select “...” → “New Tab”.

- Enter “debug_custom.json” and press OK.

- Enter the following code:
[
{
"configId": "renesas:rl78g23_fpb_p64:g23-fpb-64p",
"debuggerArgs": [
"-ex",
"set non-stop on",
"-ex",
"shell bash ./startserver_COMPORT.sh R7F100GLG /dev/ttyUSBXX"
]
}
]
- The above debug_custom.json code is a template, so you need to modify it according to your environment.
- Change
ttyUSBXX
to the port number of the connected board.
- Change
- Select “Sketch” → “Optimize for Debugging”.
- This setting allows for more detailed debugging.
- However, compared to the default settings, ROM/RAM size will increase.

- Select “Upload”.

- Select “Start Debugging”.

-
Debugging Commands:
- Start Debugging: Start debugging.
- Reset Device: Reset the device.
- Continue: Execute the program.
- Step Over: Execute the current line and stops at the next line.
- Step Into: Enter the method of the current line and stops.
- Step Out: Execute until the end of the current function and proceeds to the caller.
- Restart: Restart the device.
- Stop: Stop Debugging.
-
Debug Information:
- Call Stack: Displays the current source location and call stack information.
- Variables: Displays variables.
- Local: Displays local variables within the function.
- Global: Not supported.
- Static: Not supported.
- Registers: Not supported.
- Watch Expressions: Displays variable information by adding variable names.
- Variables can be added from “Add Expression”.
- Breakpoints: Displays information about set breakpoints.
- You can set/remove breakpoints by left-clicking on the left side of the sketch line number.
- CORTEX PERIPHERALS: Displays peripheral register information.
- CORTEX REGISTERS: Not supported.