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
Locked Topic Debugger Being Uncooperative... (SOLVED) (Read 9063 times)
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Debugger Being Uncooperative... (SOLVED)
Nov 2nd, 2015 at 11:39pm
 
I've been using VisualMicro with AtmelStudio for several years, with few problems, EXCEPT....  I've never had ANY luck getting the debugger to work.  I've trialed it once or twice, but never could get it to work reliably enough to want to actually purchase it.

I'm now working on a relatively huge project (at least three or four dozen source files, over 200K of object code), and a debugger would be really nice. When I started AtmelStudio yesterday, I got the "update" dialog, telling me about a new version, and offering to install it, along with another debugger trial.  I clicked OK, and pretty much nothing happened  After A while, I just went to the website, and tried to download the update manually, but it appeared to me there was only a beta version for AtmelStudio 7, and I'm still on 6.2.  So, I instead downloaded the VS version, which installed in my VS2013 Community.  It works fine, as far as it goes, but still no debugger.  The help pages indicate some settings that need to be checked in the settings menus accessed through the "gear" button in SerialMonitor.  But that button is disabled in my SerialMonitor, so I am once again stumped.

Am I doing something wrong, or am I just jinxed?  I'd really like to get the debugger working, and buy a license, but I don't have a lot of time to mess around trying to get it to work....

Regards,
Ray L.
« Last Edit: Nov 14th, 2015 at 2:07am by Tim@Visual Micro »  
Back to top
 
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Debugger Being Uncooperative...
Reply #1 - Nov 3rd, 2015 at 3:35am
 
I have it working, partially.  I went into Project Properties, and set (Micro Debug) to Full, and breakpoints started working.  But, I can't see any data - the watch window shows only "waiting for debug breakpoint data".  I can also turn off (Micro Debug) and check Automatic Debugging, though it was not working earlier.

What is the trick to getting the watch data to show?
  
Back to top
 
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Debugger Being Uncooperative...
Reply #2 - Nov 3rd, 2015 at 4:00am
 
For a while, it was highlighting the source line containing the currently executed breakpoint, but that has just stopped working.  It is still breaking correctly, and the output window reflects the correct location, but the line is not highlighted....

The PC is connected via COM4, at 115200 BAUD.  That is Serial (Programming Port) on the Due I'm using.  The settings in Program Properties are set for this - COM4 for Local Port, Serial for Remote Port.  I also tried using the Native Port for Debugging, but that changed nothing.  Still no watch/data display.

Regards,
Ray L.
« Last Edit: Nov 3rd, 2015 at 4:01am by RayLivingston »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugger Being Uncooperative...
Reply #3 - Nov 3rd, 2015 at 11:30am
 
Line highlights are based on the focus settings. I suggest you install one of the vs extensions that highlights lines more obviously when they are focused.

For other questions the debugger documentation is here http://www.visualmicro.com/page/User-Guide.aspx?doc=index
  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Debugger Being Uncooperative...
Reply #4 - Nov 3rd, 2015 at 4:18pm
 
OK, I'm making progress, but still finding things I clearly don't grok....

The code is trivial:

Code (C++)
Select All
int cnt = 0;

void loop(void)
{
    cnt++;
    printf("hello, world\n");
}
 



My breakpoint setup is:

Breakpoint on the printf
WhenHit = print a message showing the value of cnt
Condition = cnt > 10
HitCount = Break when HitCount is any multiple of 5

But the behavior is not what I expect.  I would expect the printf to happen 10 times, then break.  Doing a continue should then printf five more times then break, but instead breaks after only one more printf.  Also, the HitPoint count always displays (in the HitCount dialog) as zero.

Am I misunderstanding something here?  This is in VS2013.  With AtmelStudio, I have yet to get it to break at all when Condition and HitCount are set.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugger Being Uncooperative...
Reply #5 - Nov 3rd, 2015 at 4:39pm
 
The HitCount defaults to Millis(), so any multiple of 5 means every 5 milliseconds.

The HitCount can be switched from timer to counter in the project settings.

The HitCount in the break dialog can be ignored, it's an internal Vs thing and we don't use the windows debugger.

cnt is never reset to 0 (Condition = cnt > 10)

If you add a "when hit" message you need to uncheck "Continue execution" if you want to break

VS and atmel work the same way so it can only be breakpoint set or project properties causing atmel not to break. Unless of course you have ticked "Visual Micro>Trace Only", then you only get trace (no break)

« Last Edit: Nov 3rd, 2015 at 4:39pm by Tim@Visual Micro »  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Debugger Being Uncooperative...
Reply #6 - Nov 3rd, 2015 at 6:56pm
 
Tim,

OK, makes sense.  Thanks!

Regards,
Ray L.
  
Back to top
 
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Debugger Being Uncooperative...
Reply #7 - Nov 4th, 2015 at 4:02am
 
Hey, the new ability to use sub-folders in the sketch folders is worth the price of admission of the Pro version all by itself!  I LOVE IT!  And I've finally made the leap from AtmelStudio to VisualStudio.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugger Being Uncooperative...
Reply #8 - Nov 4th, 2015 at 11:22am
 
Great to hear that thanks!
  
Back to top
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Debugger Being Uncooperative...
Reply #9 - Nov 4th, 2015 at 4:56pm
 
Tim,

This project is a bit of a monster, with over 50 source files, not counting the dozen or more "outside" libraries.  I now have it all sorted out into a well-organized heirarchy, which will make management soooooo much easier!

The debugger is working nicely now as well, and I'm getting the hang of using it.  It will be a great help, and worth every penny it cost, and then some!

Now, if only you could add hardware debug support for the Due, so we could single-step....  Smiley

Regards,
Ray L.
« Last Edit: Nov 4th, 2015 at 4:56pm by RayLivingston »  
Back to top
 
IP Logged
 
BruceHardin
Newbies
*
Offline


Posts: 1
Joined: Nov 4th, 2015
Re: Debugger [No Longer]Being Uncooperative...
Reply #10 - Nov 4th, 2015 at 6:46pm
 
As per my experience with it waht happens actually is the HitCount defaults to Milli seconds.
Also the HitCount can be switched from timer to counter in the project settings.
And the HitCount in the break dialog can be ignored, it's an internal Vs thing and we don't use the windows debugger.
cnt is never reset to 0 (Condition = cnt > 10)

assembly and pcb
« Last Edit: Nov 10th, 2015 at 8:02pm by BruceHardin »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint