Sunday, December 28, 2014

Debugger for Arduino (Visual Micro)

Visual Micro is very an interesting extension for Microsoft Visual Studio (it works also in Atmel Studio). It allows you to program Arduino directly from Visual Studio environment – that’s cool, but that’s not all!

Visual Studio is incomparable with Arduino IDE in terms of users experience. It gives you all kinds of goodies like IntelliSense, syntax highliting, code navigation, git/svn/whatever integration and so on. But wait for it… it gives you also a debugger!

Debugging AVR processor requires dedicated external HW debugger, which is pretty expensive gadget. So Visual Micro is not true debugger but still, fairly awesome.

How it works?

Visual Micro utilize technique called Instrumentation.

We can take this code as an example:

When you start debugging in VS, Visual Micro takes your code and inserts small pieces of its own code into it. First is at the beginig of setup() and next to everywhere where breakpoints are.

Result is saved to temporary folder, so anybody can look at it. Path to it is usually something like c:\Users\{UserName}\AppData\Local\VMicro\Arduino\Builds\

Result of this process for the example shown above looks like this:

If you open it in normal Arduino IDE, Serial Monitor gives you something like this:

The magic happens when Visual Micro takes this cryptical lines and visualize it nicely in Visual Studio.

And that’s what you are paying for. Visual Micro with Debugger is not for free. The instrumentation is fairly simple, but the integration into Visual Studio is more difficult part. Price starts at $29. But it’s worth it.

7 comments:

  1. This way you will be able to find the one that suits your needs and budget the best. Read the best wearable spy camera review and choose the best possible spy camera for you and your family. If you are curious to know more about wearable spy camera review, discover here.

    ReplyDelete
  2. Really nice blog. thanks for sharing such a useful information.
    Testcomplete Online Training

    ReplyDelete
  3. This post is so interactive and informative.keep update more information...
    Angularjs Training in Tambaram
    Angularjs Training in Chennai

    ReplyDelete
  4. This post is so interactive and informative.keep update more information...
    Python Training in Tambaram
    Python course in Tambaram


    ReplyDelete