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
Hot Topic (More than 8 Replies) Watch and debugging line by line (Read 14456 times)
yyy
Junior Member
**
Offline


Posts: 16
Joined: Jul 19th, 2015
Watch and debugging line by line
Jul 19th, 2015 at 1:42pm
Print Post  
Hello
I'm a newbee
1.for some reason I cannot add watch (I did it in the past)
2.How can I run the arduino sketch line by line?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Watch and debugging line by line
Reply #1 - Jul 19th, 2015 at 1:56pm
Print Post  
Hi,

What are you doing to add a watch? The "When hit" breakpoint property is what you need http://www.visualmicro.com/page/User-Guide.aspx?doc=Working-With-Breakpoints-Whe...

You can only jump from break-point to break-point.
  
Back to top
IP Logged
 
yyy
Junior Member
**
Offline


Posts: 16
Joined: Jul 19th, 2015
Re: Watch and debugging line by line
Reply #2 - Jul 19th, 2015 at 3:16pm
Print Post  
How can I see the watch window?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Watch and debugging line by line
Reply #3 - Jul 19th, 2015 at 3:36pm
Print Post  
It should automatically appear if debug has started.

Does the tool bar say "Release" or "Debug"

What appears in the output window after clicking Debug>Start?

Have you set a breakpoint? If so what expressions have you added to watch?

More info will help me understand what you have done and what you do or do not know.
« Last Edit: Jul 19th, 2015 at 3:36pm by Tim@Visual Micro »  
Back to top
IP Logged
 
yyy
Junior Member
**
Offline


Posts: 16
Joined: Jul 19th, 2015
Re: Watch and debugging line by line
Reply #4 - Jul 19th, 2015 at 4:28pm
Print Post  
1. debug mode
2. after assigning breakpoint I get:
"Program Started 'Valve'
19:25:09.362 Valve.ino, line 35 character 1            (currentMillis - previousMillis)= 2468      (t0+t1)= 60000
(currentMillis - previousMillis) = 2468& (t0+t1)= 60000
19:25:09.488 Valve.ino, line 48 character 1            flow= 0
19:25:09.540 Valve.ino, line 35 character 1            (currentMillis - previousMillis)= 2557      (t0+t1)= 60000
(currentMillis - previousMillis) = 2557& 
(t0+t1)= 60000
19:25:09.583 Valve.ino, line 48 character 1            flow= 0"
and so on...
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Watch and debugging line by line
Reply #5 - Jul 19th, 2015 at 5:39pm
Print Post  
Thanks for the info

1) Please confirm what you have entered into the "when hit" message?

2) Show screen shot of your ide when debug is active. (The expressions window might be minimized or on a tab, therefore hidden?)

Thanks
  
Back to top
IP Logged
 
yyy
Junior Member
**
Offline


Posts: 16
Joined: Jul 19th, 2015
Re: Watch and debugging line by line
Reply #6 - Jul 19th, 2015 at 6:03pm
Print Post  
I used the "when hit"
  

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: Watch and debugging line by line
Reply #7 - Jul 19th, 2015 at 6:15pm
Print Post  
The problem is the Serial tool window and the expressions tool windows are hidden on tabs in the code editor.

Drag then both away from the editor with the mouse. Hold the CTRL key while you do that which will prevent them from trying to re-dock. 

You can keep them floated or you can doc them in a area of the ide where they are visible during debug.
  
Back to top
IP Logged
 
yyy
Junior Member
**
Offline


Posts: 16
Joined: Jul 19th, 2015
Re: Watch and debugging line by line
Reply #8 - Jul 19th, 2015 at 6:24pm
Print Post  
I think I did what you had told me.
but I still cannot use the watches
  

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: Watch and debugging line by line
Reply #9 - Jul 19th, 2015 at 6:28pm
Print Post  
Great thanks so we see the expression window in the very top right of the image.

I asked earlier what you have in your "When Hit" message? Please post the text from the "When Hit" message below

Thank you
« Last Edit: Jul 19th, 2015 at 6:29pm by Tim@Visual Micro »  
Back to top
IP Logged
 
yyy
Junior Member
**
Offline


Posts: 16
Joined: Jul 19th, 2015
Re: Watch and debugging line by line
Reply #10 - Jul 19th, 2015 at 6:31pm
Print Post  
the first "when hit":
{(currentMillis - previousMillis)}----{(currentMillis-tManualValveOpen)}

the others just text

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Watch and debugging line by line
Reply #11 - Jul 19th, 2015 at 6:39pm
Print Post  
Thanks for the info. Maybe there is some misunderstanding.

You have the "expressions watch" tool as the top right window.   

It needs to be made taller so that you can see the expressions that are being watched and their values

You have set two different expressions to be watched.

1. {(currentMillis - previousMillis)}
2. {(currentMillis-tManualValveOpen)}

So they expressions window should show the values of two expressions. 

In the "Expression Watch" tool of your image we can see the first expression is being watched and it has a value of 0. This matches the "Micro Debug Trace" message which also shows a value of 0

If you make the expressions tool taller (give it more height) you will see the value of the 2nd expressions

Does this make sense?

  
Back to top
IP Logged
 
yyy
Junior Member
**
Offline


Posts: 16
Joined: Jul 19th, 2015
Re: Watch and debugging line by line
Reply #12 - Jul 19th, 2015 at 6:43pm
Print Post  
You are right, we are talking about different things
I'm talking about "watch" and "quickwatch"
sorry for the trouble
« Last Edit: Jul 19th, 2015 at 6:44pm by yyy »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Watch and debugging line by line
Reply #13 - Jul 19th, 2015 at 6:53pm
Print Post  
Oh Smiley

Are you are saying that you want to click "watch" and "quick watch" to easily add variables or expressions to the "when hit" message?

or something else?
  
Back to top
IP Logged
 
yyy
Junior Member
**
Offline


Posts: 16
Joined: Jul 19th, 2015
Re: Watch and debugging line by line
Reply #14 - Jul 19th, 2015 at 7:02pm
Print Post  
There is a "watch" window
I want to see the value of variables without "when hit" 
The "watch" or "Quickwatch" does not appear
« Last Edit: Jul 19th, 2015 at 7:10pm by yyy »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Watch and debugging line by line
Reply #15 - Jul 19th, 2015 at 7:13pm
Print Post  
The Visual Micro expressions watch is the only watch window.

If you close up all your {} variables in the When Hit and do not add any text or space then the when hit message is not displayed, only the watched expressions and basic trace will be visible.

If the when hit is in the above format then your text messages from other brakpoints will be shown more clearly in the Message window.

Vs is not really running a debug session, it doesn't know about serial debuggers, so we can't use its standard debug windows (yet)

I hope this gives some help. 

ps: We might have an updated debugger coming soon that allows watch expressions to be added "live", without "when hit" or recompile.

pps: Don't forget that it's an alternative to serial debug with the ability to change values of named {variables=?}. It's not as good as hardware debug but it's all most Arduino's has got and better than hacking code with serial messages.
« Last Edit: Jul 19th, 2015 at 7:20pm by Tim@Visual Micro »  
Back to top
IP Logged
 
yyy
Junior Member
**
Offline


Posts: 16
Joined: Jul 19th, 2015
Re: Watch and debugging line by line
Reply #16 - Jul 20th, 2015 at 3:39am
Print Post  
Thanks  Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint