In May 2012 a unique serial debugger for Arduino was released in beta and has recently been updated to include the ability to change the values of variables while an Arduino is running.
In the image above you can see the entire code of a very crude (rubbish) Arduino program that is running a debugging session. You can see that the trace messages and variable values are different to those defined within the compiled program.
Approximately 300 people have joined the beta program. Feed back has been really great.
The debugger integrates seamlessly into the Visual Studio IDE providing conditional breakpoint, trace and expression watch features. Unlike a conventional debugger, the Arduino is not required to break (pause) to enable variable values to be altered (optional).
We can use any available Arduino code to conditionally apply breakpoints.
Complex or simple debug messages can be generated without the need to include the text of the messages in the final Arduino program. For most users this prevents the programs from becoming "bloated" with text/debug messages
APM FastSerial is fully supported. Debug using xbee is also supported but you should not fly a debug version without first becoming very familiar with how the debugger works. (If you are unsure then talk it over with us in the Forum). The image below shows a running apm debug session that is sharing the main serial port with the apm code. This is optional, we can share or use any arduino serial port (in most cases) or use other Arduino technologies such as SoftwareSerial.
The Arduino debugger is currently being distributed for free to anyone who would like to join the beta program. You can join the program by registering for the Visual Micro forum and including a request for the debug tool.
If you don't have a copy of Visual Studio Professional this article explains how to get a 3 year licence for free.
If you do use the debugger for an apm project (or with an apm example) then you will find a few tips for configuring an apm debug session here
The debugger is an upgrade to the free Arduino plugin for Microsoft Visual Studio Professional. Further reading, small wiki and a YouTube example can be found at visualmicro.com
The debugger optionally supports open source visualizations allowing us to create graphical controls that represent the various sensors of our Arduino projects
Thanks ramboky, Yep Tim. I know how you feel about the Arduino IDE. If someone has never written a line of code before or never uploaded to an Arduino then I think the Arduino IDE is the best tool in the world. After that it really slows you down compared to a mature IDE such as Visual Studio.
I think you are right that in some cases Arduino isn't the right platform. However, there are a zillion hackers and makers out there using Arduino because it makes it easier for them to become more productive. Fortunately for Arduino.cc not all projects are as demanding as a huge drone project :)
Good to hear you find it easy. You don't have to buy the debugger, it is free at the moment :)
When you register for the forum say that you would like to beta test the debugger
I use it for 2month, i never return on Arduino IDE.
But i can't find where i can buy the Debugger !?
Yes it's 3 years with web site spark so new users should take the 90 days then sign up for web site spark. Students can sign up for Dream Spark instead.
About a week after signing up for Web Site Spark you will see a whole bunch of "MY PRODUCT KEYS" on msdn. VS is one key, but some of the others are quite useful if you want to build web based telemetry products.
Visual Studio is fantastic, shame that it isn't free forever, but if it was, it probably wouldn't be so good.
Yeah, I got the 90 day free trial, but I thought it was supposed to be unlimited if you signed up for website spark?
Thanks. Do you mean that you have not got access to the 90 day free trial + 3 year Web Site Spark offer? I don't understand that because in the UK we have it and I know of many Russians, German, French +++ users who have downloaded these free offers. VS 2012 is really great, so much faster than VS 2010 I recommend it highly.
To produce this offer page on the vm site I signed up with Microsoft using 3 different names. I wasn't being naughty because I haven't used the keycodes but have 3 sets of keycodes for many ms products. I thought you signed up for this a year or so ago? If so then your keycodes are still valid so you can download VS2012 from MSDN.
I am also working on a version for Atmel Studio, it's free!! So stay tuned :)
Oh man, this is great. The machine programming that I do (mostly ladder logic and VSD's) has live debugging, value changing, etc. and it's so helpful.
Just too bad MS screws Canadians over (as most do) by not offering VS for free as they do in the US. :(