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 Breakpoint not working on .cpp ? (Read 5366 times)
Zakhounet
Newbies
*
Offline


Posts: 1
Location: Paris
Joined: Nov 1st, 2012
Breakpoint not working on .cpp ?
Mar 27th, 2015 at 12:19am
Print Post  
Hi,

I would like to debug an arduino apps which include a library. I know we can't debug library but if I include on source files the .cpp, is it possible to have breakpoint working ? If so how, i am stuck  Sad Sad
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoint not working on .cpp ?
Reply #1 - Mar 27th, 2015 at 12:08pm
Print Post  
Hi,

Try giving the local cpp/h different names so that we avoid possibility of confusion with the library of the same name.

Thanks
  
Back to top
WWW  
IP Logged
 
DrOldies
Junior Member
**
Offline


Posts: 16
Location: Iowa, USA
Joined: Feb 3rd, 2015
Re: Breakpoint not working on .cpp ?
Reply #2 - May 8th, 2015 at 3:55am
Print Post  
I am using the debugger for the 1st time, and I also cannot get breakpoints to work in my .cpps (these are my personal libraries I and debugging). I saw this comment:
Zakhounet wrote on Mar 27th, 2015 at 12:19am:
... I know we can't debug library ...

But can not find anywhere in the documentation to confirm this. 

A breakpoint in my .ino sketch does work. Before I move all my code around: does all the code need to be in the same sketch folder for debug to work?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoint not working on .cpp ?
Reply #3 - May 8th, 2015 at 4:02am
Print Post  
Hi,

Sorry the docs are a bit weak about this.

No the debugger does not work in libraries

Yes it works in cpp files of the local sketch folder. Ensure breakpoints are in code where it would normally be possible to send serial messages (ie: not in code that initializes before the arduino core has initialized)
  
Back to top
WWW  
IP Logged
 
DrOldies
Junior Member
**
Offline


Posts: 16
Location: Iowa, USA
Joined: Feb 3rd, 2015
Re: Breakpoint not working on .cpp ?
Reply #4 - May 9th, 2015 at 3:16am
Print Post  
I moved the library to the sketch folder and now the breakpoints report a variable's value. However, I need to check values inside my timer interrupt service function. When I add a breakpoint inside this function, NO debug breakpoints work. (Serial.print() has the same problem). 

I am putting these variables in a class/public then checking them repeatedly inside loop(). Is there any way I can report the values directly from inside the interrupt service function?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoint not working on .cpp ?
Reply #5 - May 9th, 2015 at 2:17pm
Print Post  
Hi,

Sorry the debugger uses Serial (or SoftwareSerial etc) which do not work inside interrupt code.

You would need a hardware debugger for that.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint