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 Cannot get breakpoint to work with local library file (Read 1960 times)
groz
Junior Member
**
Offline


Posts: 16
Joined: Feb 21st, 2018
Cannot get breakpoint to work with local library file
Jun 19th, 2018 at 9:26pm
Print Post  
I'm having a problem getting a breakpoint to occur in library header file. The normal library is under Arduino. 

Using VS2017 and Industruino board.

Here are the steps I've taken:
1) copied the file of interest locally into project
2) made #include reference to it using ""
3) performed (added existing) reference to .h file (contain actual code) using solution explorer. 
4) renamed original file in library under arduino lib structure

I know the local file is being used since adding a syntax error to it causes a compiler error. Using "Goto Definition" pulls up the local file as well.
When using the project explorer (under explorer, file set to ALL), I can see the routine where the breakpoint is set. The path to the file is "not" a link but contains full path.The project compiles and runs just does not break.

Does VM support pulling a file of interest into a project to allow debug? This library is huge and covers numerous devices,etc. Each calls other arduino structured using libraries <>.

On simple libs, I've pulled all files locally and got breakpoint to work using a source,header reference in explorer along with an #include. 

What am I doing wrong?

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot get breakpoint to work with local library file
Reply #1 - Jun 19th, 2018 at 9:28pm
Print Post  
.h files are not compiled and therefore not debugged.

Only code in .ino and .cpp files are compiled and debuggable.
« Last Edit: Jun 19th, 2018 at 9:29pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
groz
Junior Member
**
Offline


Posts: 16
Joined: Feb 21st, 2018
Re: Cannot get breakpoint to work with local library file
Reply #2 - Jun 19th, 2018 at 10:24pm
Print Post  
I've attached the .h file which contains the class [bool BlynkProtocol<Transp>::run(bool avail), line 129] where I'm trying to break at. How can I break within the class? 

This is structured different than I'm familiar with. Normally the .h has the class and definitions for vars,functions ect. Then .cpp uses scope resolution. In that case, the function is in the .cpp file and references the class i.e. class::function_name

Any suggestions?
  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot get breakpoint to work with local library file
Reply #3 - Jun 20th, 2018 at 2:52pm
Print Post  
You can not put breakpoints in .h files they are not compiled files but we will try to cater for that in the future.

You should consider the debug breakpoints as serial.print() code, it's very simple not full debugging. 
« Last Edit: Jun 20th, 2018 at 2:53pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
groz
Junior Member
**
Offline


Posts: 16
Joined: Feb 21st, 2018
Re: Cannot get breakpoint to work with local library file
Reply #4 - Jun 20th, 2018 at 4:03pm
Print Post  
Tim,

thanks for confirming I'm not missing something AND thank you for considering it in future releases.

I did use serial.println() and it works BUT, hey, you spooled us with breakpoints... Wink
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint