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 FROM Table WHERE Foo = Bar";
If I'm inspecting this in the debugger and choose "Copy Value" the value put into the clipboard has 's in place of the carriage returns which is a bit of a pain. Is there a way to change this behaviour? (I know I can print it in the command window...)
Cheers,
Alex
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.
,nq
2.1m questions
2.1m answers
60 comments
56.9k users