Is there anyway to debug arduino uno?

Hi, I want to debug my arduino program, is there anyway to do it?
P.S. The board is arduino uno, and the code is arduino program, not the standard C/C++.

Add serial print statements at strategic places.

PS Arduino code is written in C/C++.

Apart from serial prints, I sometimes have a led or two blink to catch my attention under certain circumstances.

There are various methods using devices like an ATMEL-ICE, etc. But here are 2 cheap methods I like:

  1. Hardware debugging using another arduino.

  2. Via simulation inside AtmelStudio.

sterretje:
Add serial print statements at strategic places.

PS Arduino code is written in C/C++.

Hi, sterretje,
Thank you for replying. Serial print method is helpful.
Best regards.

anthonyHope:
Apart from serial prints, I sometimes have a led or two blink to catch my attention under certain circumstances.

Hi, anthonyHope,
Thanks.

JimEli:
There are various methods using devices like an ATMEL-ICE, etc. But here are 2 cheap methods I like:

  1. Hardware debugging using another arduino.

  2. Via simulation inside AtmelStudio.

Hi, JimEli,
Thank you. The websites are useful. Unfortunately, google has been blocked in China.
Best regards.