Page 1 of 1
Debug in Arduino IDE - is it possible? ...or even Platform IO
Posted: Thu Feb 06, 2025 2:54 pm
by timdelta
Is it possible to use the debug function in Arduino IDE?
- I have STM32F4 and am using ST-Link V2 to program id via SWD, but can't get it to work (tbh I've never used the debug function before so it may well be operator error!)
Re: Debug in Arduino IDE - is it possible? ...or even Platform IO
Posted: Thu Feb 06, 2025 4:10 pm
by fpiSTM
Yes it is functional.
Enable the Optimize for debugging in the Sketch menu.
Compile, upload then click the debug button.
Re: Debug in Arduino IDE - is it possible? ...or even Platform IO
Posted: Fri Feb 07, 2025 7:31 am
by timdelta

Thanks so much, I'm happy debugging now....
Re: Debug in Arduino IDE - is it possible? ...or even Platform IO
Posted: Tue Feb 25, 2025 10:03 pm
by geologic
Debugging stm32 in arduino IDE sounds great, do you have a roadmap how to do it? I cannot find much information on internet...
Re: Debug in Arduino IDE - is it possible? ...or even Platform IO
Posted: Wed Feb 26, 2025 5:21 am
by fpiSTM
If you have a STLINK simply follow the step described in my previous post or read the chapter "Getting to Know the Debugger" here
https://docs.arduino.cc/software/ide-v2 ... -debugger/
Re: Debug in Arduino IDE - is it possible? ...or even Platform IO
Posted: Wed Feb 26, 2025 2:54 pm
by geologic
That chapter is for SAMD boards, i assume it will work for STM32, right?
I have one nucleo-64 with integrated stlink programmer, i'll give it a try.
Thanks
Re: Debug in Arduino IDE - is it possible? ...or even Platform IO
Posted: Wed Feb 26, 2025 3:49 pm
by fpiSTM
The way it works is then same. Tools configuration are done under the hood moreover for a Nucleo64.
So simply:
Enable the Optimize for debugging in the Sketch menu.
Compile, upload then click the debug button.