github / VisualStudio

GitHub Extension for Visual Studio
https://visualstudio.github.com
MIT License
2.37k stars 1.21k forks source link

QuickWatch Doesn't Have "View" Button For StringBuilder (VS 2022) #2726

Closed Emrebener closed 1 year ago

Emrebener commented 1 year ago

In my institution, we use ADO.NET for data access, hence we define SQL queries as static variables like so;

image

We then assign these static string variables to StringBuilder properties to further manipulate them, like so;

image

During debugging, when I try to "QuickWatch" a StringBuilder (with shift+F9), it doesn't let me properly see the SQL queries. I'm having to copy it to clipboard, paste into notepad, and then manually fix new lines to be able to understand the SQL queries.

StringBuilder seems to be getting rid of newlines, and QuickWatch window doesn't have the convenient "View" button for StringBuilder like it does for strings.