Code Debugging Tips
g3cwi
Posts: 262
At the moment I am coding using the Propellor Tool. That's quite basic but mostly work (it does crash sometimes). I have been using PST or the "Simple Debug" Object. I find these a little annoying in that the serial terminal seems to need to be started manually each time. The whole debugging support seems a bit ad-hoc and the Propellor Tool is not a very comprehensive "IDE" unless I am using it incorrectly.
What tools do the gathered experts recommend for debugging code: important note - I am new to this! I am aware of BST and Viewport but have not used either in anger.
Regards
Richard
What tools do the gathered experts recommend for debugging code: important note - I am new to this! I am aware of BST and Viewport but have not used either in anger.
Regards
Richard
Comments
My command sequence for rapid code testing is: F10 F12 Enter. Oh, and don't close the PST screen. Just leave it open. Also, if you've loaded your program into EEPROM, you can reboot just by checking, then unchecking the DTR box. (It'd be nice if there were a "Reset" button in PST that performed this sequence automatically.)
-Phil
The script will try to compile the code, and if successful download it to the Propeller, and if successful automatically start up a serial terminal. If at any point it can't do something it aborts with an error. All this, with a single key stroke.
For the most part, I've found terminal debugging to be sufficient. I've done development of C++ and Java on a workstation before, and usually find myself being able to debug better using a terminal anyway than doing things like breakpoints and profiling. Terminal debugging usually gives a better picture of program flow than stepping through a program IMHO.
You can also do debugging through LEDs attached to IO pins (especially useful for PASM). I've used Ariba's PASD debugger before and I like it (except for not cross platform!), and there's also Jazzed's debugger.
As a side note, if you use BST (cross platform IDE for Propeller) it will automatically manage the serial port so you don't have to worry about multiple things hanging on the COM port.