How to check for Stack overflow in an embedded application?
A common way to check for memory usage is to prefill memory with a constant value before your program runs.  eg a sequence of 0xde 0xad could be written out to your stack area by your startup code.  During the program's operation, the stack will grow and write over these sequences.  If you then have the ability to examine memory, then you can easily see the untouched 0xde 0xad bytes in memory and so determine how much stack has been used.

It's usually hard to detect an overflow as it occurs since function call return addresses are stored on the stack and any function return will send the program off into the weeds.  In this case, if your watchdog is enabled and you can set a breakpoint at the reset vector, you may still be able to examine the memory and look for your prefill bytes to determine if this is what has caused a reset.