Page 1 of 1
Best way to debug
Posted: Mon Jan 04, 2016 9:57 pm
by KCReefer
I was wondering what all of you use to test your code before you push it to the controller?
I would like to be able to add printlns and run the code to see what variable values are during runtime to ensure that the controller is doing what I expect it to do.. What is the best way that you know of?
Re: Best way to debug
Posted: Tue Jan 05, 2016 6:44 am
by lnevo
Serial.println() function. Then view in Serial Monitor
Re: Best way to debug
Posted: Tue Jan 05, 2016 6:58 am
by binder
I try to step through the logic of the code. then I add the debug print statements (like Lee said). and then I push it to my controller to test.
we don't have an emulator for the controller to test out before you run it.
Sent from my XT1585 using Tapatalk
Re: Best way to debug
Posted: Wed Jan 06, 2016 11:19 pm
by KCReefer
Thanks! I'll do that once I get my replacement cable.
What do you use to serial into it?
I'm used to using putty. I'm assuming that it will work as long as I select the right com port.
Re: Best way to debug
Posted: Thu Jan 07, 2016 7:33 am
by lnevo
The arduino gui has it built in. Look for Serial Monitor under Tools I believe
Re: Best way to debug
Posted: Fri Jan 08, 2016 8:00 am
by cosmith71
It's the little magnifying glass in the upper right corner.