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 Using debugger in interrupt routine (Read 4159 times)
Gilles Plante
Full Member
***
Offline


Posts: 156
Location: Québec, Canada
Joined: Oct 31st, 2013
Using debugger in interrupt routine
Mar 6th, 2014 at 4:13pm
Print Post  
I think I know the answer to my question: is there some way to use the debugger in an interrupt routine ?

As far as I can tell, using When hit breakpoints will fail because from within an interrupt routine, it's not possible to write to the serial port.

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using debugger in interrupt routine
Reply #1 - Mar 6th, 2014 at 4:16pm
Print Post  
Hi Giles,

You are right that it needs special handling.

I believe that you can save off a volatile variable then use it within a conditional debug statement in the main code.

If you have mastered conditional breakpoints then you might also find that switching ThrottleEnabled=False will prevent unwanted debug delays.





  
Back to top
IP Logged
 
Gilles Plante
Full Member
***
Offline


Posts: 156
Location: Québec, Canada
Joined: Oct 31st, 2013
Re: Using debugger in interrupt routine
Reply #2 - Mar 6th, 2014 at 4:51pm
Print Post  
Well,

I have never used conditional breakpoints. I guess the condition is on top of When Hit for example. I would have to store, say, a value in a global variable and in loop check if that variable changed ?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using debugger in interrupt routine
Reply #3 - Mar 6th, 2014 at 6:30pm
Print Post  
Yes, you can either put the breakpoint inside a normal 'if' statement or add a condition to the breakpoint Condition property.

Switching off the throttle will avoid delays in time critical measurements but only do that if you find the delays cause a problem, It's better with the throttle switched on unless a problem
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint