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 Using Atmel Studio the debugger does not stop at breakpoints + (Read 10605 times)
Mike Fairey
Newbies
*
Offline


Posts: 6
Location: York, England
Joined: Oct 29th, 2013
Using Atmel Studio the debugger does not stop at breakpoints +
Oct 29th, 2013 at 3:27pm
Print Post  
I don't have a Visual Studio Pro License so I am using Atmel Studio 6.1 I have purchased a license for the debugger and installed the License key. But when I start Debugging and Break  - the compiler runs, it uploads to the arduino and starts executing but does not stop at any breakpoints, and if the expressions window do es come up there is nothing in it. What have I done wrong or missed? Sad
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using Atmel Studio the debugger does not stop at breakpoints +
Reply #1 - Oct 29th, 2013 at 4:45pm
Print Post  
Hi Mike,

Break/Pause

Stopping at breakpoints is optional because some people using drones and robots don;t understand that stopping means the robot might crash Smiley

There is a wiki link here that shows how to enable the Break/Pause property.

Expressions

To use the expressions window you need to have set a BreakPoint "When Hit" message specifying the data that you want to watch. Have you done this? The link above shows a simple view of a combined expression watch and text message breakpoint. 

Adding =? to variables makes allows them to be modified while the arduino is running:-

{myVar=?}

Using the shared Serial port?

If you do not see any trace window info or expressions the other thing to check is if your code is also using the Serial object but at a different speed to the debugger. If so then you can set the debugger to use the same speed your code is using by completing the RemoteSpeed project property. 

The debugger default is 115k
  
Back to top
IP Logged
 
Mike Fairey
Newbies
*
Offline


Posts: 6
Location: York, England
Joined: Oct 29th, 2013
Re: Using Atmel Studio the debugger does not stop at breakpoints +
Reply #2 - Oct 29th, 2013 at 6:32pm
Print Post  
I have followed all your suggestions and Expressions on COM6 Window just says "Waiting for debug breakpoint data" in light grey text.

The Adruino board will stop break at one point, but it won't shift the break to another breakpoint. I am just running the blink sketch with added Serial.print and .println lines to be sure its working. But I have commented out all the serial lines and the Serial.begin to see if they were causing the Arduino to jump out of a break. The breakpoint highlighting does not move when the sketch is running. Sad
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using Atmel Studio the debugger does not stop at breakpoints +
Reply #3 - Oct 29th, 2013 at 6:48pm
Print Post  
Sorry it's a pain for you I can confirm that lots of people are using the debugger so we should be able to find the problem or confusion. Let's tackle this one at a time if that's okay with you.

First to get some trace info and also to see some expression data ignoring the break/pause facility for now. Please set Break/pause = False then try these tests.

1)
There will be two compilations for debug, the word debug will appear in the 2nd

Do you see the word "debug" in the compilation message?

2)
If you add a breakpoint to the first line of loop() then compile and upload do you see the "Micro Trace" output window with a stream of messages confirming the loop() has been hit lots of times? 

nb: You must compile and upload for any changes to breakpoints to be recognized.


3)

If you then add a "When Hit" message to the breakpoint of {millis()} and compile upload do you see millis() in the expression window and the trace?

4)

Which Arduino board are you using?

Thanks

  
Back to top
IP Logged
 
Mike Fairey
Newbies
*
Offline


Posts: 6
Location: York, England
Joined: Oct 29th, 2013
Re: Using Atmel Studio the debugger does not stop at breakpoints +
Reply #4 - Oct 29th, 2013 at 10:53pm
Print Post  
To answer your 4 questions:-

1)
There will be two compilations for debug, the word debug will appear in the 2nd

Do you see the word "debug" in the compilation message? 

YES - see below

Compiling 'sketch1' for 'Arduino Uno'
Binary sketch size: 1110 bytes (used 3% of a 32256 byte maximum) (1.23 secs)
Compiling debug version of 'sketch1' for 'Arduino Uno'
Binary sketch size: 3840 bytes (used 12% of a 32256 byte maximum) (1.98 secs)
Uploading to I/O board using 'COM6'
Done uploading


2)
If you add a breakpoint to the first line of loop() then compile and upload do you see the "Micro Trace" output window with a stream of messages confirming the loop() has been hit lots of times? 

nb: You must compile and upload for any changes to breakpoints to be recognized.

NO  the Micro Debug Trace is completely empty

3)

If you then add a "When Hit" message to the breakpoint of {millis()} and compile upload do you see millis() in the expression window and the trace?

NO - Sketch1 | Expressions on COM6 window is empty except for "Waiting for debug breakpoint data" in light grey text

4) Arduino UNO with SMD USB device
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using Atmel Studio the debugger does not stop at breakpoints +
Reply #5 - Oct 29th, 2013 at 11:46pm
Print Post  
Thanks for the clear answers. Please zip and email the sketch1 folder and any sub folders to info [at] visualmicro.com so I can look at the settings.

Thanks
  
Back to top
IP Logged
 
Mike Fairey
Newbies
*
Offline


Posts: 6
Location: York, England
Joined: Oct 29th, 2013
Re: Using Atmel Studio the debugger does not stop at breakpoints +
Reply #6 - Oct 30th, 2013 at 12:08am
Print Post  
Hi There,
I seem to have come up with a sort of solution. It must have been something to do with the way I loaded up the original sketch. I just loaded another sketch and it all worked just fine. I then reloaded the Blink sketch again from the examples folder and again it worked just fine.

I fear it was finger trouble, I must have fiddled with things I didn't understand and messed up some settings.

Regards

Mike Smiley
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using Atmel Studio the debugger does not stop at breakpoints +
Reply #7 - Oct 30th, 2013 at 4:40pm
Print Post  
Great. It might be that you had opened a source code that wasn't included in the current project. This can be confusing because you would be able to add breakpoints but they would be ignored during compile.

The sign of an unconnected source code file is that when editing it, the solution explorer will have nothing highlighted when normally the current code file name would be highlighted.

Just a guess, ignore if wrong and great to hear things are working for you.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint