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 function template debugging (Read 4684 times)
wergor
Newbies
*
Offline


Posts: 8
Joined: Oct 9th, 2016
function template debugging
Oct 9th, 2016 at 6:46pm
Print Post  
hi, 

I'm trying to debug a function template. the break point in line 444 of the attached screenshot seems to be never hit, but breakpoints outside the function template work as expected.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: function template debugging
Reply #1 - Oct 9th, 2016 at 7:44pm
Print Post  
Hi,

I just tried to debug a template and the results were okay (see image). 

The debugger is quite simple. It adds serial messages to the code in the temp build folder. 

You can see the code that is actually compiled by looking at the source code in the build folder. Switch on "vmicro>compiler>show build folder" to see a link to the build folder in the output.

If your code is in .ino files the look at the project_name.cpp. If unsure then please email the sources from the build folder to info[at]visualmicro.com

Thanks
  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
wergor
Newbies
*
Offline


Posts: 8
Joined: Oct 9th, 2016
Re: function template debugging
Reply #2 - Oct 9th, 2016 at 9:08pm
Print Post  
Hi, 

I have looked at the files in the build folder. no code was added for the break points in the function templates (which are located in .h files). I have created a small test project and sent it to the email address you provided, including the contents of the build folder. 

I'm using Visual Studio Community 2015 (Version 14.0.25431.01 Update 3) and Visual Micro plugin version 1610.4.2
« Last Edit: Oct 9th, 2016 at 9:09pm by wergor »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: function template debugging
Reply #3 - Oct 10th, 2016 at 12:46pm
Print Post  
Hi,

Breakpoints in .h files are not yet supported. An update is due during the next few weeks for .h files.

For now maybe it's possible to add c++ code to .cpp files and use .h files only for prototypes and declarations?

Thanks
  
Back to top
IP Logged
 
wergor
Newbies
*
Offline


Posts: 8
Joined: Oct 9th, 2016
Re: function template debugging
Reply #4 - Oct 10th, 2016 at 2:06pm
Print Post  
Hi, 

all my implementation is in .cpp files, except function templates, which I didn't manage to declare in .h and  implement in .cpp files (but this is for another thread).

Thanks for your assistance, I'm looking forward to the update.
« Last Edit: Oct 10th, 2016 at 2:08pm by wergor »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: function template debugging
Reply #5 - Oct 10th, 2016 at 2:09pm
Print Post  
Okay thanks very much. Will up the priority on that.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint