Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How do I start debugging my code on the Arduino attached to my USB port (COM5)? (Read 6735 times)
Fred Koschara
Junior Member
**
Offline


Posts: 13
Location: Peabody Mass. USA
Joined: Mar 3rd, 2014
How do I start debugging my code on the Arduino attached to my USB port (COM5)?
Mar 4th, 2014 at 11:16am
Print Post  
I have Atmel Studio set up through the External Tools to program the Arduino via USB through the virtual COM5 port.  That works.

What I need to do is debug the code on the Arduino - set breakpoints, watch variables, step through the code, etc.  because "by guess and by golly" debugging isn't working any more.

When I hit F5 to start debugging, it starts the simulator, not the Arduino - and locks up in the LCD initialization code because the simulator doesn't have an LCD attached to it.

How do I tell Atmel Studio/Visual Micro that I want to debug on the Arduino, and how do I get that process started????

Did I miss something in the setup instructions?  (BTW, where *are* the setup instructions?)
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How do I start debugging my code on the Arduino attached to my USB port (COM5)?
Reply #1 - Mar 4th, 2014 at 4:54pm
Print Post  
Hi Fred,

We don't use external tools you do need to follow the setup instructions which can be found on the visualmicro.com home page (see home & wiki at the top of this page). 

On the right side of the home page you can see the "basic setup" link and also the "Getting started" link.

After you have a working Visual Micro Addin you can look at the debugger which has it's own link at the top of the visualmicro.com home page.

There is also a youtube video on both home page and debugger page with an overview of the debugger basics.

You also need to save us some time by explaining if you are using the standard 6.1 release of atmel or if you have downloaded the 62. beta. You also need to say if you downloaded the standard visual micro or the beta for 6.2. Both beta version were released in the last week so not really for new users.

Please confirm you can see these links. Thanks
« Last Edit: Mar 4th, 2014 at 4:58pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Fred Koschara
Junior Member
**
Offline


Posts: 13
Location: Peabody Mass. USA
Joined: Mar 3rd, 2014
Re: How do I start debugging my code on the Arduino attached to my USB port (COM5)?
Reply #2 - Mar 4th, 2014 at 11:12pm
Print Post  
The instructions I found when I was installing Atmel Studio said to set up programming using the External Tools.  Maybe there should be some installation instructions INCLUDED IN THE VISUAL MICRO PACKAGE - e.g., at least a pointer in the README file - that give the clues about how to set things up?

Now that you've mentioned them, I do see the "basic setup" and "getting started" links on visualmicro.com - but it's not obvious that failure to read anything on those pages will make it impossible to get your program to work - I usually expect to find usable instructions inside the installation package, rather than having to go to the Web for the critical details.

I did a Google search for information about debugging an Arduino with Atmel Studio and I found a bunch of YouTube videos where Dennis Hill rambles on about a whole bunch of stuff I already know - and the one about debugging only said "hit F5" to start debugging - which was completely useless to me because that does *not* start the Arduino debugger.

Instead of posting YouTube videos, how about a bullet-point list of steps to follow where experienced users can skip over the things they already know and find the information they are looking for?  You can't do that watching a video!

(I may be relatively new to Arduino programming, but I've been doing hardware and software development for over 40 years - and I've never seen an "IDE" as atrocious as the Arduino one is!  Didn't they ever hear of a Makefile instead of building the world every time one line of code gets changed?  How about describing RAM usage?  or cleaning up 500MB of leftover build files???)

In my other post I pasted the report from Atmel Studio's About box, I guess I should have included it here as well:

Atmel Studio 6 (Version: 6.1.2730 - Service Pack 2)
© 2013 Atmel Corp. All rights reserved.
« Last Edit: Mar 5th, 2014 at 5:20pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How do I start debugging my code on the Arduino attached to my USB port (COM5)?
Reply #3 - Mar 5th, 2014 at 5:24pm
Print Post  
Hi Fred,

Thanks for confirming you are using the current 6.1 release of Atmel Studio.

We have some new documentation being made and will be available shortly. The initial work was to get the product right but Arduino has changed so fast the docs got left behind.

The official youtube video shows clearly how to enable debug for a project https://www.youtube.com/watch?v=fFM8_RhIG0U which is mainly just switching the "Micro Debug" project property to Full.

We need to first confirm your install is working. When you click compile F5 you have stated the debugger does not start but does the Arduino compile work? I suggest we use your other thread to confirm your basic setup then we can help activate the debugger which will be easy.
  
Back to top
IP Logged
 
Fred Koschara
Junior Member
**
Offline


Posts: 13
Location: Peabody Mass. USA
Joined: Mar 3rd, 2014
Re: How do I start debugging my code on the Arduino attached to my USB port (COM5)?
Reply #4 - Mar 6th, 2014 at 2:20pm
Print Post  
The UI in the video doesn't look what's on my machine - there are no properties for the project, and there's no Arduino target option for the debugger:

http://theoriginalprototype.com/projects/Arduino/20140306-wfredk-no-Arduino-targ...

(I couldn't figure out how to insert the image directly into the post, so I put it on my Web site at the URL above.)
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How do I start debugging my code on the Arduino attached to my USB port (COM5)?
Reply #5 - Mar 6th, 2014 at 3:57pm
Print Post  
You will see in the video that we do not use the std. atmel devices for debug or programming so I don't know why you are expecting to see an Arduino option in the device list or why you have that screen open  Smiley

The problem is that your system is not loading properly so you can't see the options. This is why I have asked that we fix your system load problem that you have posted in the other thread and stop using this thread.

Thanks
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint