Debug in Arduino IDE - is it possible? ...or even Platform IO

Post here first, or if you can't find a relevant section!
Post Reply
timdelta
Posts: 9
Joined: Thu Jan 16, 2025 4:04 pm

Debug in Arduino IDE - is it possible? ...or even Platform IO

Post 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!)
by fpiSTM » Thu Feb 06, 2025 4:10 pm
Yes it is functional.
Enable the Optimize for debugging in the Sketch menu.
Compile, upload then click the debug button.
Go to full post
fpiSTM
Posts: 1944
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 108
Location: Le Mans
Contact:

Re: Debug in Arduino IDE - is it possible? ...or even Platform IO

Post by fpiSTM »

Yes it is functional.
Enable the Optimize for debugging in the Sketch menu.
Compile, upload then click the debug button.
timdelta
Posts: 9
Joined: Thu Jan 16, 2025 4:04 pm

Re: Debug in Arduino IDE - is it possible? ...or even Platform IO

Post by timdelta »

:oops: Thanks so much, I'm happy debugging now....
geologic
Posts: 22
Joined: Thu Dec 15, 2022 10:12 am
Answers: 2

Re: Debug in Arduino IDE - is it possible? ...or even Platform IO

Post 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...
fpiSTM
Posts: 1944
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 108
Location: Le Mans
Contact:

Re: Debug in Arduino IDE - is it possible? ...or even Platform IO

Post 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/
geologic
Posts: 22
Joined: Thu Dec 15, 2022 10:12 am
Answers: 2

Re: Debug in Arduino IDE - is it possible? ...or even Platform IO

Post 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
fpiSTM
Posts: 1944
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 108
Location: Le Mans
Contact:

Re: Debug in Arduino IDE - is it possible? ...or even Platform IO

Post 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.
Post Reply

Return to “General discussion”