Copy value of watch variable in visual studio without escape characters

后端 未结 3 1843
太阳男子
太阳男子 2020-12-13 13:05

Ok, this one has been driving me bonkers for ages and VS 2010 hasn\'t improved this. Say I have a variable like so

string szSql = 
@\"SELECT 
     Foo, Bar
F         


        
3条回答
  •  天命终不由人
    2020-12-13 13:36

    Append ,nq (short for no quotes) to the variable name in the watch window and it will display the string without escape characters, which you could then copy. For reference the MSDN document is here.

提交回复
热议问题