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... Break/Pause (Read 6058 times)
Gary12
Newbies
*
Offline


Posts: 7
Location: California
Joined: Dec 12th, 2013
Breakpoint... Break/Pause
Dec 21st, 2013 at 4:57pm
Print Post  
Aside from being able to examine hardware, is there anything else I should be able to do? For instance examine variables...
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoint... Break/Pause
Reply #1 - Dec 21st, 2013 at 5:50pm
Print Post  
Hi Gary,

Yes you can examine variables and you can also update them while the Arduino is running or when it is paused at a breakPoint. 

The "When Hit" breakpoint property is used to identify the variables/expressions to be "watched". (Recompile and upload is required after changing breakpoint properties).

Breakpoint "When hit" examples (all {var/expr} become watched expressions)

Code
Select All
{millis()}{foo1} 



or

Code
Select All
This is a breakpoint message combined with data {millis()} and foo1 is {foo1} 



The docs do need more work but there is a lot of information on visualmicro.com. Click the "Visual Micro" tab at the top of this page.

Of note is the debugger overview and  YouTube video.

The wiki also contains additional information such as this article about how to modify the values of variables while the Arduino is running. 

Hope this helps?

Following shows highly configured breakpoint reporting with modifiable watch expressions

« Last Edit: Dec 21st, 2013 at 5:58pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Gary12
Newbies
*
Offline


Posts: 7
Location: California
Joined: Dec 12th, 2013
Re: Breakpoint... Break/Pause
Reply #2 - Dec 22nd, 2013 at 5:53am
Print Post  
I must be missing something. I didn't see anything that described how you change the run time value of variables defined as follows in the breakpoint {i=?}... I tried changing the value of the variable in the expressions window, but the results were not what I expected. I changed i from 4 to 5, and it showed up next time through as 48... Can't figure out how to use this feature even after watching the videos, and reading the link you provided.

Frustrated...  Sad
  
Back to top
 
IP Logged
 
gelius59
Junior Member
**
Offline


Posts: 82
Location: Ukraine
Joined: Oct 6th, 2012
Re: Breakpoint... Break/Pause
Reply #3 - Dec 22nd, 2013 at 8:13am
Print Post  
" changed i from 4 to 5, and it showed up next time through as 48..."

Sorry it looks like the wrong type of variable.
This may be a type byte.
Check the type of the variable in the control point.
Sincerely.
« Last Edit: Dec 22nd, 2013 at 12:45pm by gelius59 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoint... Break/Pause
Reply #4 - Dec 22nd, 2013 at 2:33pm
Print Post  
Thanks gelius59

@Gary it sounds like your original question is answered and you can now see how to set watch expressions and other breakpoint properties?

Modifying running variables

When it comes to altering variables you do need to be aware of any special data types. Keep in mind that when values are sent to the pc from the Arduino the debugger uses (in background) Serial.print() which as you might know formats data to human readable. When updating variables Visual Micro does attempt to reverse the conversion but sounds like it isn't succeeding in your test.

Can you please give an example of the definition of the variable you are attempting to set so that we can test. Thanks


tip: you can also format data that is sent to the pc yourself if required using the same syntax as can be used normally with arduino serial as follows:-

{myVar,HEX}
{myVar,BIN}
etc
« Last Edit: Dec 22nd, 2013 at 2:35pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Gary12
Newbies
*
Offline


Posts: 7
Location: California
Joined: Dec 12th, 2013
Re: Breakpoint... Break/Pause
Reply #5 - Dec 22nd, 2013 at 9:26pm
Print Post  
It was byte data, and when I used your formatting suggestion {VariableName,DEC=?} it worked as expected.

Thanks for your time!

I think the Debugger will be a big time saver, and will definitely purchase the license when my trial period is up.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoint... Break/Pause
Reply #6 - Dec 22nd, 2013 at 9:36pm
Print Post  
Great thanks for the update and thanks again to gelius59 for the direction  Smiley
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint