VS Arduino
Visual Micro >> Usb/Serial/WiFi Debugging >> Confused by the trace window
https://www.visualmicro.com/forums/YaBB.pl?num=1616266826

Message started by chris52 on Mar 20th, 2021 at 7:00pm

Title: Confused by the trace window
Post by chris52 on Mar 20th, 2021 at 7:00pm
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

Title: Re: Confused by the trace window
Post by Tim@Visual Micro on Mar 20th, 2021 at 8:46pm
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?




Title: Re: Confused by the trace window
Post by chris52 on Mar 20th, 2021 at 10:31pm
Yes, I intended a debug version (that's why I started using VM again  :) ) . 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.

Title: Re: Confused by the trace window
Post by Tim@Visual Micro on Mar 20th, 2021 at 11:02pm
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?

Title: Re: Confused by the trace window
Post by chris52 on Mar 22nd, 2021 at 10:15am
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)

Title: Re: Confused by the trace window
Post by Tim@Visual Micro on Mar 22nd, 2021 at 11:53pm
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.

Title: Re: Confused by the trace window
Post by chris52 on Mar 24th, 2021 at 11:02am
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.

Title: Re: Confused by the trace window
Post by Tim@Visual Micro on Mar 24th, 2021 at 5:00pm
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.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.