Posts Tagged VS2008Tip
Using unescaped paths in the Visual Studio Watch window
Posted by Patrick in Visual Studio on December 24, 2007
I am often debugging an app in Visual Studio and add a variable containing a file path to the watch window. I’ll usually want to open the file to verify the contents so I will copy and paste the path into a command window. This is really annoying because the pasted path doesn’t work due to the double backslashes. I have to spend time converting all the double backslashes into single backslashes in order for the path to work.
Here is a simple solution to this problem: In the watch window append “,nq” to the end of the variable in the watch window. This will automatically remove the double backslashes and quotations. Once that is done you can copy/paste the string into a command window and use it without modification.