Background: I have made a standalone Arduino board using Atmega328PB. I have written code for a clock which lights LEDs based on the time. After a day or so it locks up. Sometimes it reboots.
I would like to get debug software that will tell me where in the code it is locking up or crashing.
It could be a memory issue - stack and heap crashing(?). Compiler tells me sketch is using 62% of 32256 bytes storage space. Global variables use 34% of dynamic memory leaving 1332 bytes for local variables of 2048 bytes total.
Question: Is there relatively cheap ( < $100) debugging software that is not very complex I could use to solve this issue?