I'm debugging a Python module and had the same problem. For more than half hour I went crazy, but finally I've got it. Notes:
While having the solution open, I started by removing VUF. Opening the Project Property Pages dialog, the default values are there:
Command: $(TargetPath)
CommandArguments:
In the same time VUF was generated (I didn't even have to close the dialog). Here's it's content (notice the namespace):
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
Then I populated the above fields (don't mind the values):
After closing the dialog (or pressing Apply), VUF content became:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommand>E:\WinOBT\1.0.0.0\OPSWpython\2.7.10\x64_d\python_d.exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommandArguments>-c "import _xmlrpc as _x;print _x.decode('<value><string>aaa</string></value>')"</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>
while CommandArguments became: -c "import _xmlrpc as _x;print _x.decode('<value xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><string>aaa</string></value>')"
VS as we know, stores its settings in xml format (not the string representation in the file, but the actual xml tree - that results from parsing the string representation). Well, I've learned that parsing an xml string (that converts it to a tree), then converting back the tree to string, will yield (in most of the cases) a different result than the original string.
Here I described this behavior (well it's about a Python parser, but I'm sure that all - or many - behave the same).
So, we have an xml (that we would like to be stored as plain text) inside an xml (the project settings), and that confuses a little VS's parser when it attempts to parse it, yielding a behavior that I think it's odd:
After I circled around i found a way to partially overcome this (it's a lame workaround - or gainarie):
manually modify VUF, turning our xml into a CDATA section:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommand>E:\WinOBT\1.0.0.0\OPSWpython\2.7.10\x64_d\python_d.exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommandArguments><![CDATA[-c "import _xmlrpc as _x;print _x.decode('<value><string>aaa</string></value>')"]]></LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
</PropertyGroup>
</Project>
Reload the solution (as VS doesn't read VUF every time we open the dialog since its internal tree hasn't changed)
Now the xml string is properly passed to the executable, and also properly displayed in the Project Property Pages dialog. Beware: if you modify any of the settings, in the dialog, that will trigger VS to reload (reparse) the data, and it will mess it up again.