How to make my sketches tidy?

Is there a way to make Arduino C tidy or well indented and colored. There is increase indentation in File menu but it does not do much.
There is or has been software for better looking C code, it would be nice to have some in Arduino too.
I am using a Windows machine.

Colouring is not important, indentation is.
The auto format tool can help.

1 Like

Did you try using Autoformat? Or setting preferences to use an External Editor?

You can run the free Microchip Studio if you want a pro-level IDE but most forum posts use beginner-friendly Arduino.
Free Studio/IDE at Microchip

I have not noticed Autoformat. I tried it now and it is not too bad. It is better than nothing sure.
That other Ide could be nice, but there is no proper debug anywhere for Arduino, so we shall see.

We use prints to trace execution.

I get for free; as good or better software tools than I paid for in the 80's.

1 Like

The IDE is pretty basic. You can find much nicer ones, but since most Arduino projects are small, I haven't found it necessary.

I believe that the 2.0 version (still in beta?) has better debugging for some of the (more modern) hardware that supports it - never tried it though.

There's some information about Arduino IDE 2.x's integrated debugger here:

It's true that 2.x is still in the beta development phase. It is certainly worth giving a test drive, but probably a bit too early to switch over to using it full time unless you want to contribute to the project by beta testing.

There's loads of info and tools on the Microchip site.
Want better debug? Run ARM-chip Arduinos and get all the good stuff.

Sure. I have played with ST ARMs and they have real debuggers. They are nice to play with. Arduino supports some and I like some. There is one large problem. I can't make my own boards because there are no CPUs anywhere. No stock until year 2022.
With that stock situation I am very happy I used Atmel CPUs in my work.

PJRC has ARM Teensy's in stock including the 4.1 with Cortex M7 running at 600MHz.

Is it even possible to get breakpoints or single stepping in Arduino boards.

Only compiler I have paid for was Microsoft macro assembler. And that was not an whole IDE, it was just Make fun.

Yes. The Arduino IDE 2.x integrated debugger has that. Hopefully support will be added to more boards platforms over time.

Not bad

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.