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) Breakpoints not breaking (Read 11368 times)
Evan
Junior Member
**
Offline


Posts: 27
Location: Northeast U.S.A.
Joined: Oct 25th, 2012
Breakpoints not breaking
Nov 1st, 2012 at 1:15am
Print Post  
I've got a fresh install of the VS plugin and the Debug tool.  Generally works fine except the breakpoints never hit.  Config details below.

I've got a simple Blink type sketch with enough Serial trace to ensure that the absolute latest version is being uploaded on every trial.  VM and Debug tool downloaded moments ago.  I can set breakpoints in the Debug tool but they never 'hit'.

VS Build config is "Debug".  Simple breakpoints set by clicking left margin of source appear normal and are listed in the VS Debug Breakpoints window.  Right click on breakpoint shows expected context menu - Condition, Hit Count, etc.  No special conditions or trace set on any of the breakpoints.

Click "Start Debugging" and the sketch compiles, uploads and runs, but never breaks.  Nothing in Output, Serial, or Immediate windows other than normal build/upload messages.

Any help/pointers appreciated.  I'm new to this forum.  Apologies if I've missed something obvious.

  - Evan

Configuration:
Windows 7 on 64bit AMD Quad Core
Visual Studio 2008 - V9.0.30729.1 SP
Visual Micro for Arduino - 12.10.2601
Visual Micro Debug Tools etc. - 12.10.2403
Arduino Nano V3 clone

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoints not breaking
Reply #1 - Nov 1st, 2012 at 1:49pm
Print Post  
Hello,

Have you set (Micro Debug) to Full in the project properties window?

Have you watched the video?
http://www.youtube.com/watch?v=fFM8_RhIG0U

Doing so should allow you to see the breakpoints being hit in the "Micro Trace" that will be available as an Output window when the debug starts.

Once you have this working you can optionally enable the project property called "Break/Pause" to cause the breakpoint to actually stop and wait. Otherwise the default is Trace/Report mode.

There are a few documents on the visual micro wiki. They do need more work for the release version of the debug tool but they do provide useful information. Here is one http://www.visualmicro.com/post/2012/05/05/Enable-Arduino-Debugging.aspx

Thanks
« Last Edit: Nov 1st, 2012 at 1:50pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Evan
Junior Member
**
Offline


Posts: 27
Location: Northeast U.S.A.
Joined: Oct 25th, 2012
Re: Breakpoints not breaking
Reply #2 - Nov 1st, 2012 at 3:40pm
Print Post  
Considerable progress!

I had indeed missed the significance of setting Micro Debug to "Full", not to mention tweaking Local Port, Remote Transport, et al.  Tracepoints are now working fine with messages, timestamps, variables, Min/Max, etc.

I'm taking a couple hours break to let my keyboard cool off and will then have a try at the full stop breakpoints.

Hopefully Constructive Feedback:  You might test the waters WRT your use of the term "Breakpoint".  I've been using VS since the primordial QuickC days, and before that endured many many years of assembler.  I therefore expected "Breakpoint" to mean the traditional Full Stop and then Poke Around action, rather than the flyby 'Tracepoints' which appear to be the design point of the Debug Tool.  This is not to say that I'm necessarily right - there certainly aren't many like me left around anymore - but setting expectations correctly is a huge part of keeping support costs under control.

Anyway, grateful thanks for the prompt and helpful response.

  - Evan
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoints not breaking
Reply #3 - Nov 1st, 2012 at 5:32pm
Print Post  
Any suggestions are welcome. All tracepoints can become breakpoints so the functionality is there it just needs to be enabled.

It's difficult to know how to describe this. The reason for adding the additional setting to enable a physical "break/pause" of the mcu was because of concerns for new users who are playing with drones. 

I thought it might be dangerous to allow such easy pause of the arduino for people who don't understand the consequences. (When you enable it you will see the warning)

I imagined someone breaking/pausing the code when a gyro hit a certain limit, which might cause a plane to fall from the sky or an rc car to loose control.

So you can have a traditional break/pause. see project property "Enable Break/Pause=True"

Don't forget this solution will work using xbee or other remote serial transport so can be more dangerous than normal programming.
« Last Edit: Nov 1st, 2012 at 5:36pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Evan
Junior Member
**
Offline


Posts: 27
Location: Northeast U.S.A.
Joined: Oct 25th, 2012
Re: Breakpoints not breaking
Reply #4 - Nov 1st, 2012 at 6:21pm
Print Post  
Your point is well taken that debugging MCU applications is quite a bit different than building a traditional accounting package.  And there are certainly many more Ardo programmers in your customer audience than Grizzled Old Timer's.  Perhaps it's best to leave it on a Least Surprise basis, or possibly Least Physical Damage.

And step-by-step descriptions of various scenarios will get even the GOT's past the teething problems.

Thanks again.  You've given us a marvelous set of tools.

  - Evan
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoints not breaking
Reply #5 - Nov 1st, 2012 at 6:32pm
Print Post  
Thanks for all your support and input it has been appreciated. 

Yes, the documentation needs some serious work!! It is one reason why it is still in beta. 

You are not the first to suggest step by step guides. One member also suggested some wizards that guide through the settings of various scenarios. Some videos would also be great. Hint hint  Cheesy
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoints not breaking
Reply #6 - Nov 1st, 2012 at 6:36pm
Print Post  
ps: One question. 

When you view the project properties tool window can you see the descriptions of each property in the tip at the bottom of the window?

If not then you will see a horizontal bar below the properties that can be dragged upwards to give the tips area a reasonable size. 

I though the first job might be to make the tips more useful but not if they aren't obviously visible for most?
  
Back to top
IP Logged
 
Evan
Junior Member
**
Offline


Posts: 27
Location: Northeast U.S.A.
Joined: Oct 25th, 2012
Re: Breakpoints not breaking
Reply #7 - Nov 1st, 2012 at 8:01pm
Print Post  
The tips are there but I could have stared at that dialog for 37 years before it occurred to me to slide the bar up enough to expose them.

The tips themselves are enormously more helpful than the bare property names.  Also gives the product a 'professional' feel.

My recco is to keep the tips and find some way to make the bar action more obvious.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoints not breaking
Reply #8 - Nov 1st, 2012 at 8:15pm
Print Post  
Thanks, I will try to include images of them when I make examples and improve the docs. 

This might make it more obvious but the intention is also move them and a lot of other settings to the "Micro Explorer". 

It will be easier to have a more obvious tip system in the explorer and I find the properties window a pain because when we click into source code the properties jump from project to that of the source file.

So, it would be nice to have the option to have the project properties on-screen all the time (or not) +The source file properties are not useful.
  
Back to top
IP Logged
 
Evan
Junior Member
**
Offline


Posts: 27
Location: Northeast U.S.A.
Joined: Oct 25th, 2012
Re: Breakpoints not breaking
Reply #9 - Nov 2nd, 2012 at 8:31am
Print Post  
The Properties window 'jump' you mention is the reason why it took me so long to find the "Micro Debug" setting.  Moving the MD properties to a separate window makes more sense to me than having them be part of the VS project.  This will be a big win!

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