Best way to debug

Do you have a question on how to do something.
Ask in here.
Post Reply
KCReefer
Posts: 18
Joined: Sun Oct 19, 2014 7:31 pm
Location: Kansas City

Best way to debug

Post 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?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Best way to debug

Post by lnevo »

Serial.println() function. Then view in Serial Monitor
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Best way to debug

Post 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
KCReefer
Posts: 18
Joined: Sun Oct 19, 2014 7:31 pm
Location: Kansas City

Re: Best way to debug

Post 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.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Best way to debug

Post by lnevo »

The arduino gui has it built in. Look for Serial Monitor under Tools I believe
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Best way to debug

Post by cosmith71 »

It's the little magnifying glass in the upper right corner.
Post Reply