Any housekeeping or debugging libraries?

It would help debugging if there'd be instructions for free ram and so on.

I think I have a memory leak with long messages. I can, and will, put checks in every buffer but detecting and finding these kinds of problems is a matter of luck sometimes. It could be easier.

Is there anything in GCC? it's documentation is so professional I can't use it.

You can try eclipse or visual studio. If I remember correctly, others have mentioned their support for certain debugging features. I think eclipse can even show the stack/locals.

A few diagnostic led's may be a handy way of showing error codes if serial is used for something else.

When everything is done, I disconnect Arduino from the PC. So serial bus is for debugging only. Leds are good and watchdog too. But they don't tell what broke the system. And it takes time to wait to system to crash. And hope it wont crash, and also hope it will crash soon, to know is it allright or not. Debugging by waiting.

A wlan shield might be good to tell what is going on with the system. But it still takes a lot of work and program space, to put a notification in every function.