Go Down

Topic: Debugging frustration (Read 898 times) previous topic - next topic

I'm only a newbie to Arduino, but I have quite a lot of previous programming experience.  I find de-bugging quite a frustrating experience.  In order to monitor how my programme behaves, I have to included code which is unnecessary for the finished project (e.g. to echo outputs to an SD logger onto the serial monitor).  And we have to upload the code, and let the device struggle before we realise that there must be a problem with the code.

I have 2 suggestions:

  • Would it not be possible to set up a virtual Arduino on the computer where you have the IDE running, purely to get the code behaving right before upload?

  • Can the IDE be structured so that it is possible to view two pages at once, or to split the screen?


CrossRoads

Re: suggestion 1, I typically have other hardware connected to the arduino which the software interacts with. Modeling the software only is not very  beneficial.  I would think writing code to simulate those external devices would just be a path to introducing more errors.
Have you looked into any of the Atmel ICE devices?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

AWOL

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Nick Gammon


Can the IDE be structured so that it is possible to view two pages at once, or to split the screen?


You can configure it to use an editor of your choice, or simply open the code yourself in a separate editor (that is one page) and view the other one in the IDE.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

OK, thanks eveyone, it seems there are workarounds.  I'm very respectful of the simplicity of the Arduino project, so I withdraw my suggestions! 

As  someone noted in that other thread, it's when using libraries that I run into the biggest problems, because I don't understand how they work unless I spend days delving into their code.  I guess I just need to be more methodical and build up my Arduino programs in smaller chunks.

Go Up