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 Confused by the trace window (Read 2356 times)
chris52
Junior Member
**
Offline


Posts: 47
Joined: Jan 9th, 2017
Confused by the trace window
Mar 20th, 2021 at 7:00pm
Print Post  
Just started using VM again after a 3-year break. But can't understand what is going on in the trace window.

1. what is the data in the square brackets?
2. why, when I add variables (moveX,moveY) do they get printed twice?
3. why is it listing the filename and line number twice?
Thanks
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Confused by the trace window
Reply #1 - Mar 20th, 2021 at 8:46pm
Print Post  
The data is the square brackets are performance stats. Time taken between break-points. Can be switch off on the vMicro debugger menu.

Your post shows two debug notifications 
1) a trace message 
2) a break/pause message telling you the debugger is waiting for your instruction to continue. It confirms the breakpoint info.

Did you mean to make a debug upload?



  
Back to top
WWW  
IP Logged
 
chris52
Junior Member
**
Offline


Posts: 47
Joined: Jan 9th, 2017
Re: Confused by the trace window
Reply #2 - Mar 20th, 2021 at 10:31pm
Print Post  
Yes, I intended a debug version (that's why I started using VM again  Smiley ) . I've now seen how to turn off the stats, thanks. But still puzzled why my values appear twice - once automatically, it seems, and once in the format that I specified ('move to x,y'). Why both? it rather makes the trace window more difficult to read, with the extra newlines making it harder to pick out changes of data.
It probably isn't that important, but I was wondering if I was mssing something here.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Confused by the trace window
Reply #3 - Mar 20th, 2021 at 11:02pm
Print Post  
If you click the Continue Execution checkbox on the breakpoint properties then you would only see one message.

If you do not add your own breakpoint message but allow breakpoint pause then you would only see one message.

If we didn't add the breakpoint source to the pause message you would not know for sure where the pause is, this is especially the case when working with more than one breakpoint.

A possible future enhancement might be to continue to show the pause line number but exclude the source code if the last debug message is for the same breakpoint and if users have added a message that includes the source code.

You don't need to add any message in the breakpoint message other than the {variables}. Then you would see values in the message and watch expressions + source code in the pause message.

It seems like things are working okay considering all the possible variations. Altering your message might remove the confusion for you?
  
Back to top
WWW  
IP Logged
 
chris52
Junior Member
**
Offline


Posts: 47
Joined: Jan 9th, 2017
Re: Confused by the trace window
Reply #4 - Mar 22nd, 2021 at 10:15am
Print Post  
Ok, I see now, thanks. Adding a message  "move to {moveX},{moveY}" has a different result to just "{moveX},{moveY}", only one line is output in the latter. So  I won't use any additional text in the expression (unless I have to for some reason)
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Confused by the trace window
Reply #5 - Mar 22nd, 2021 at 11:53pm
Print Post  
Great. 

fyi: Yes also do not need the comma between the {variables} but it might be easier for you. The watch expressions window should show the values + min/max clearly along with which breakpoint they apply too.
« Last Edit: Mar 22nd, 2021 at 11:54pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
chris52
Junior Member
**
Offline


Posts: 47
Joined: Jan 9th, 2017
Re: Confused by the trace window
Reply #6 - Mar 24th, 2021 at 11:02am
Print Post  
Thanks for the help, Tim. I think I found a minor bug in the process. I had a breakpoint in a function with 5 arguments and the variable values were too far to the right of the trace window (I had to scroll to see them). So I renamed the arguments (to make them shorter) but the new names didn't appear in the trace output until I restarted VS.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Confused by the trace window
Reply #7 - Mar 24th, 2021 at 5:00pm
Print Post  
Thanks for the note we will look at that however it might be a vs bug. Did you see the watch expressions is a dockable window? Can be useful when viewing long expressions. There is also a "word wrap" mini icon on the trace window that will wrap the trace text.
« Last Edit: Mar 24th, 2021 at 5:01pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint