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) Expressions window missing? (Read 12789 times)
j12
Junior Member
**
Offline


Posts: 24
Joined: Dec 21st, 2014
Expressions window missing?
Jan 1st, 2015 at 12:52am
Print Post  
I cant get the expressions window to show.

I have added a {myVar=?} to the "when hit, message" of a breakpoint.

I clicked the serial button as per here:
http://www.visualmicro.com/page/User-Guide.aspx?doc=Working-With-Breakpoints.htm...

I clicked the "other windows->watch expressions" as per here:

http://www.visualmicro.com/page/User-Guide.aspx?doc=Serial-Monitor-Options-Butto...

Nothing happens?

Further, then "digital pins" and "analog pins" windows can be shown, however, they are both blank.

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Expressions window missing?
Reply #1 - Jan 1st, 2015 at 12:54am
Print Post  
The is a bug fix for the visualizations which broke in the last couple of releases. 

Please download the beta from visualmicro.com downloads page. It's just a service pack so not really a beta.

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


Posts: 24
Joined: Dec 21st, 2014
Re: Expressions window missing?
Reply #2 - Jan 1st, 2015 at 1:20am
Print Post  
The digital and analog windows are now working, but I still cannot get the expressions window to show.
  
Back to top
 
IP Logged
 
j12
Junior Member
**
Offline


Posts: 24
Joined: Dec 21st, 2014
Re: Expressions window missing?
Reply #3 - Jan 1st, 2015 at 1:24am
Print Post  
Forget that, it's working now (restarted Atmel Studio again).
  
Back to top
 
IP Logged
 
j12
Junior Member
**
Offline


Posts: 24
Joined: Dec 21st, 2014
Re: Expressions window missing?
Reply #4 - Jan 1st, 2015 at 1:42am
Print Post  
OK i think i've found a bug. If i change a value in the expressions window, the next time the breakpoint that prints the value out is hit, the value has changed to 48 + whatever value i enter. 48 is ascii '0', which makes me think this is a parse error of some kind.

I set the value to 0, it changes to 48 on next printout.
I set the value to 5, it changes to 53 on next printout.
etc..

The actual variable has changed, e.g. my software tests for == 0, and fails as the value is 48.
« Last Edit: Jan 1st, 2015 at 1:43am by j12 »  
Back to top
 
IP Logged
 
j12
Junior Member
**
Offline


Posts: 24
Joined: Dec 21st, 2014
Re: Expressions window missing?
Reply #5 - Jan 1st, 2015 at 1:52am
Print Post  
Only for values 0 -> 9, if I enter 10 upwards, the value changes to 48 every time.

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Expressions window missing?
Reply #6 - Jan 1st, 2015 at 1:56am
Print Post  
Hi, what is the data type of the variable you are using?

Thanks
« Last Edit: Jan 1st, 2015 at 2:00am by Tim@Visual Micro »  
Back to top
IP Logged
 
j12
Junior Member
**
Offline


Posts: 24
Joined: Dec 21st, 2014
Re: Expressions window missing?
Reply #7 - Jan 1st, 2015 at 10:01am
Print Post  
uint8_t - I've sent a basic project to reproduce the problem.
« Last Edit: Jan 1st, 2015 at 10:20am by j12 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Expressions window missing?
Reply #8 - Jan 1st, 2015 at 2:11pm
Print Post  
Hi,

This is correct and not a bug. It is correct because we are using a software serial debugger as a replacement for your own serial statements. As such the debugger does not know about data types (yet).

If you sent ascii serial to your own code and attempted to put it into an integer variable you would get the same result.

However, Visual Micro does support the standard arduino serial data type formats in {variables} and expressions.

You will find these documented on Arduino.cc under the Serial overview. (,HEX, DEC, BIN) etc.

If you change your breakpoint to include the DEC format it will work as you expect

{myVar,DEC=?}

You can change the values of any variables regardless of being in a break or not. This means that even in trace mode you can change values without needing to stop/pause at a breakpoint. The values are applied after the breakpoint is hit so that we know they are all in scope.

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


Posts: 24
Joined: Dec 21st, 2014
Re: Expressions window missing?
Reply #9 - Jan 1st, 2015 at 8:59pm
Print Post  
Really? Sorry, I disagree with you here. Think about this from a users point of view. If i enter zero, i expect the variable to be set to zero, not 48!

If the debugger needs to send ASCII serial, why does it not convert my input to ascii hex string, then send as ascii and convert back again in the arduino code?

e.g.

If i set an expression to 0 in the IDE, The IDE would send "0x00" string to the arduino, the arduino code converts this back to zero.
Simple way to make sure that what the user enters is actually what the user gets without having to know the inner workings of the IDE. 
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Expressions window missing?
Reply #10 - Jan 1st, 2015 at 9:16pm
Print Post  
Hi,

First I agree it could be easier but for that we would need the pc to know the data type of each variable. We are working on things that might allow that to happen.

In terms of how Arduino normally works please try the following.

1) Open the arduino ide and create a sketch that prints a numeric variable.
2) Add some code that reads serial into the variable
3) Open the serial monitor and send a 0

What value does the variable contain after reading the 0 into it?

In performing this exercise you will also see the code the debugger avoids you having to add to your sketches. 

No body suggests the debugger to be perfect simply a way of making things a little easier. The concepts of taking an ascii string and converting it to the correct data type is not uncommon but as I have said, possibly avoided in the future.
« Last Edit: Jan 1st, 2015 at 9:52pm by Tim@Visual Micro »  
Back to top
IP Logged
 
j12
Junior Member
**
Offline


Posts: 24
Joined: Dec 21st, 2014
Re: Expressions window missing?
Reply #11 - Jan 1st, 2015 at 9:50pm
Print Post  
Great, thanks Smiley
  
Back to top
 
IP Logged
 
j12
Junior Member
**
Offline


Posts: 24
Joined: Dec 21st, 2014
Re: Expressions window missing?
Reply #12 - Mar 10th, 2015 at 12:24pm
Print Post  
I've noticed that in Feb release you changed this (fixed it) so that the default type sent is now decimal. That's what i'd expect. Great work.

Can i please ask that you recognize 0x or 0b to denote hex and bin entries please rather than {myInt=?,HEX} (feature request i guess.).

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Expressions window missing?
Reply #13 - Mar 10th, 2015 at 2:40pm
Print Post  
Ok makes sense thanks
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint