VS_DEBUGGER_COMMAND_ARGUMENTS not working with VS 2019
With !2150 (merged) came VS_DEBUGGER_COMMAND_ARGUMENTS and looking at the comments, it had worked for Visual Studio 2017. We see when using this with VS 2019 that the debugger is not setting the arguments when launching the process. We have to manually go to the target properties in VS and click into the text field to make it work.
We found out the following:
After generating the VS project with CMake, the relevant section in the vcproj file looks like this:
<LocalDebuggerCommandArguments Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">--pluginfolder "$(OutDir)/ </LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments Condition="'$(Configuration)|$(Platform)'=='Release|x64'">--pluginfolder "$(OutDir)/"</LocalDebuggerCommandArguments>
After going once into the target properties in VS and clicking into the text field Visual Studio creates a new file called ProjectName.vcxproj.user with the following contents where starting the debugger with arguments works afterwards.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>--pluginfolder "$(OutDir)/"</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>--pluginfolder "$(OutDir)/"</LocalDebuggerCommandArguments>
</PropertyGroup>
</Project>
Edited by Arne Scheffler