Using ToString to display on watch window

Lloyd Sheen 1,481 Reputation points
2024-02-09T19:14:01.4833333+00:00

VS used to use the override of ToString to display in the watch window for objects. This no longer happens. Any way to get this back?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,203 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,607 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Patrick, Keith 0 Reputation points
    2024-07-05T03:22:11.7933333+00:00

    I was writing up a full bug report on this before realizing that this is due to Pinned Member as Favorite feature. In my case, the "Position" property kept showing up as my item value (first property in the list). Deselect all properties that are showing up (you can stack your pinned favorites), and it will fall back to the ToString() value as expected.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.