Can the Visual Studio Debugger display strings unquoted/unescaped?

前端 未结 2 869
渐次进展
渐次进展 2020-12-03 14:36

The managed debugger in Visual Studio (I am using 11.0) displays string values containing double quotes and backslashes like this:

\"{\\\"Text\\\":\\\"C:\\\\         


        
2条回答
  •  死守一世寂寞
    2020-12-03 15:05

    I just found one more way of doing this in the debugger window.

    Instead of

    ?myStringVariable
    

    use

    System.Diagnostics.Debug.print(myStringVariable, {"nq"})
    

    That seems to stop the double quoting.

    EDIT: An even easier way:

    ?myStringVariable,nq
    

    Thats working for me in Visual Studio 2015

提交回复
热议问题