awulkiew / graphical-debugging

Graphical Debugging extension for Visual Studio
MIT License
150 stars 24 forks source link

Not able to view System.Drawing.Point in C# #56

Closed emlodnaor closed 1 year ago

emlodnaor commented 1 year ago

What am I doing wrong when System.Drawing.Points don't show up in the view? I've added the xml for User-defined types, but it doesn't display anything.

In the plot view options, I've set everything to true.

Sorry if this should be obvious...

image

awulkiew commented 1 year ago

Interesting use case. I haven't tested passing new points. In general the extension is for drawing variables after hitting some breakpoint. Is this some test that you've made or do you need to draw points that doesn't exist in your code?

There are two potential problems (aside from possible bug)

  1. Try to add a name of variable from your code instead of a new point
  2. Plot Watch probably requires containers of points so if you want to display a single point Geometry Watch would probably be better, or you can add a list of points to Plot Watch instead
emlodnaor commented 1 year ago

You're right, the problem was that it has to be in a list, I was working with single points I needed to visualise in relationship to each other, but putting each of them in a list worked, so I'll just do that...

I did the new Point(1,1), just for testing that the problem wasn't with my code/data... It didn't show up in Geometry Watch either, but now that I put the points in lists it works :)

Thank you :)

awulkiew commented 1 year ago

You're welcome. Consider switching to Geometry Watch. Not only you will be able to display points but also the ratio between X and Y will be preserved.