vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Display multiline string in the debug view tooltips as actual multiline strings

Open DevAM-Tools opened this issue 1 year ago • 1 comments

At the moment tooltips in the debugging view show multiline strings as single line strings. Line breaks are shown in their escaped form. This makes it hard to read multi line strings when debugging, especially when dealing with long strings. These are barely readable when you are debugging with VS Code.

Therefore I want to propose that the tooltips in the debugging view show strings as actual multiline strings if they contain line breaks.

Current Situation:

Image Image

In comparison Visual Studio allows to view multiline strings in a separate window which is very useful.

Image Image

DevAM-Tools avatar Aug 07 '25 06:08 DevAM-Tools

This is really a VS Code feature request rather than an extension request. VS Code is tracking this with https://github.com/microsoft/vscode/issues/197287.

The best work around today, is if you add the variable to the watch window, you can right click on it, and from there 'Copy Value' will give you the raw string. If the string in question is a field/property instead of a variable, you can also do the same from a DataTip,

gregg-miskelly avatar Aug 07 '25 16:08 gregg-miskelly