Debugging frustration

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?

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?

More here

snusmumriken:
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.

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.