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
Hot Topic (More than 8 Replies) No DEbugger (Read 10646 times)
Davidh
Junior Member
**
Offline


Posts: 19
Location: uk
Joined: Nov 20th, 2012
No DEbugger
May 31st, 2013 at 3:29pm
Print Post  
Compiled and uploaded a simplest possible (blink pin13) app with breakpoint on the first line in loop() - 'Start debugging and break' has no effect - the pin 13 led is blinking - so the app is running(?).

Project Properties are visible and the debugger is fully registered - I am a registered beta contributor - this is my first use on Atmel.

Atmel6.1 and Visual Micro downloaded and installed today (in W8).
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No DEbugger
Reply #1 - May 31st, 2013 at 3:53pm
Print Post  
Hi,

Thanks for your clear report!

The break facility is optional, the default is to trace. This is because some new users would not realize that a break on a flying machine would cause a real break (plane or copter crash) Smiley

Please set project property "Enable Break/Pause=True"

Thanks
  
Back to top
WWW  
IP Logged
 
Davidh
Junior Member
**
Offline


Posts: 19
Location: uk
Joined: Nov 20th, 2012
Re: No DEbugger
Reply #2 - May 31st, 2013 at 4:40pm
Print Post  
Thank-you - I have looked into both Project Properties (Alt-F7) and Solution Properties (ALT-Enter), the project is in Active(Debug) and Active(AVR) mode, and neither show any option "Enable Break/Pause=True".

Also looked in Property Pages. 

What is AVR? 

I think I have installed the Patch AVRGcc etc dated 31/5/2013 - no change observed.

I finally found the setting please ignore this
« Last Edit: May 31st, 2013 at 5:01pm by Davidh »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No DEbugger
Reply #3 - May 31st, 2013 at 4:57pm
Print Post  
Hi David,

The plugin does not use any of the AVR in Atmel Studio, it uses the files includes with the Arduino Ide, No patch required.

AVR is the type of chip on an Arduino, or the Arduino Due has SAM instead. With the plugin you can ignore all of the normal Atmel Studio property pages and any discussion of "chip type". The plugin provides a list of Arduino boards, when you select a board the plugins ensures the correct Atmel Studio project settings.

The patch discussed on this site is an Atmel Studio patch that is referenced on the Atmel Studio page. This patch is responsible for the ALT+ENTER project properties.

There is a youtube video on this page that shows basic usage of the debugger (skip first 2 mins)

The Atmel patch is required to see the project properties, without which you will not be able to switch on debugging and will not be able to switch on break/pause.

The patch will not be required for future versions of Atmel Studio

I hope this makes sense,

Thanks

EDIT ps: 

The plugin does not use the standard Atmel hardware debugging system because Arduino does not support debugging. 

The debugger is a software debugger which means that behind the scenes USB Serial.print() code is injected during compilation to force breakpoint data to Atmel Studio. 

The plugin simply uses Atmel Studio as a code editor and for intellisense + breakpoint config. 

When an Arduino project is active, all other Atmel Studio features are overridden to work the same that the Arduino Ide works. 

When the debugging is running the plugin is responsible for all settings and the entire UI.

This is why the Visual Micro project settings are important, they cater for a lot of things that Atmel Studio and Visual Studio do not.
« Last Edit: Jun 2nd, 2013 at 10:18pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Davidh
Junior Member
**
Offline


Posts: 19
Location: uk
Joined: Nov 20th, 2012
Re: No DEbugger
Reply #4 - May 31st, 2013 at 6:12pm
Print Post  
Thank-you for your patience and helpful comments.

I tried to follow the 'patch' instructions discussed on this site, but the patch was already installed.

My problem was that I was trying to open the properties of the Solution rather than the Project -  I can now stop at breakpoints - need to figure out the rest e.g. how to view the digital pin values - I expected to see Pin13 toggle red-green, but it stays red.

Must read the documentation

Thanks again
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No DEbugger
Reply #5 - May 31st, 2013 at 6:26pm
Print Post  
Great, yes everyone must remember to click the project name in the solution explorer when viewing the Properties Window

More Info about the real-time digital pin viewer

The automatic reports for digital pins fires one at the start of the loop, so if in the meantime the pin has transitioned from off>on>off then you will only see red.

The automatic report is for newer users and can be used manually instead.

You can switch it off and set breakpoints to force a digital pin report at the required places in your code

The debug overview page has a section called "Automated Analog, Digital and Memory Usage Visualizations" which is worth a quick read (exuse the spelling mistakes)

In short you can add text messages, variables, registers and/or special variables to "watch" in the standard breakpoint "When Hit" message. 

You wil read that one "special variable" is called {@ReportDigital}. This allows you to add two or more breakpoint (tracepoint) messages prior to and after setting the pin state. Hopefully you can find a suitable location in your code where just a couple of breakpoints with {@ReportDigital} will suffice.

One thing for everyone to remember, this makes sense but really annoys me, Visual Studio and Atmel Studio save breakpoints in the solution file and not with the project. So if you create a number of breakpoints you must save the solution when prompted (or manually) to preserve the breakpoint configuration data.

EDIT: One other tip, it is useful to prevent breakpoints from firing too often. You can use the "Condition" property of a breakpoint to detect when a variable or expression has changed. The conditional expression can be any Arduino code, therefore a condition of digitalRead(13) would allow your breakpoints to only execute when the state of the led changes.  "Conditions" and the "Hit Count" breakpoint features are a highly recommended way to use the debugger. These two features cut down on usb traffic and allow the arduino chip to work at full speed.
« Last Edit: Jun 2nd, 2013 at 3:00am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No DEbugger
Reply #6 - Jun 2nd, 2013 at 8:24am
Print Post  
David,

What do you mean the patch was already installed?

Thanks
  
Back to top
WWW  
IP Logged
 
Davidh
Junior Member
**
Offline


Posts: 19
Location: uk
Joined: Nov 20th, 2012
Re: No DEbugger
Reply #7 - Jun 2nd, 2013 at 9:58am
Print Post  
In this forum the 3rd thread about no ALT-Enter properties refers to the following:


Please close Atmel Studio and extract ProjectSystemFiles  inside the folder <Atmel Studio 6.1 Installation directory>\extensions\application

The file ProjectSystemFiles did not exist in my installation directory - but  double click on the above reference showed it contained three files all of which were in my installation!

I can ALT-Enter and see the debugger so I assumed the patch referred to was already installed.

i am easily confused, and make lots of assumptions!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No DEbugger
Reply #8 - Jun 2nd, 2013 at 4:53pm
Print Post  
Hi,

Well it seems that I am also easily confused Smiley

The files in the zip were issued to us by Atmel Corporation. They are replacements for a few Atmel Studio files. 

The date and times of the files in the zip are more recent than the files includes with the April 2013 version of Atmel Studio.

Without these updated files from the zip, it is not possible to see the Visual Micro project properties which are required to enable debugging of an Arduino project.

I hope this makes sense

  
Back to top
WWW  
IP Logged
 
Davidh
Junior Member
**
Offline


Posts: 19
Location: uk
Joined: Nov 20th, 2012
Re: No DEbugger
Reply #9 - Jun 2nd, 2013 at 7:36pm
Print Post  
To add to the confusion - since the zip file was not in my install I clicked on the ProjectSystemFile link in the thread, opened the zip and manually copied the three files into my install.

So did my copy of the latest (i.e. late May Version 6.12562 in my case) Atmel download include the latest versions of the three files or not?

The unzipped files were dated 31 May - but on reflection that was the date I unzipped them - so that tells me nothing!

The phrase 'start again' may apply - it might help VisualMicro users to know if Atmel's current (june 1st)  release is OK or not.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No DEbugger
Reply #10 - Jun 2nd, 2013 at 9:53pm
Print Post  
David,

Can you please point me to where Atmel June 1st release is and also to where the late May release is.

This is the download page that I see http://www.atmel.com/tools/ATMELSTUDIO.aspx

Thanks
« Last Edit: Jun 2nd, 2013 at 9:54pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint