Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,871
    • Issues 3,871
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 20
    • Merge requests 20
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #21751
Closed
Open
Created Jan 28, 2021 by Arne Scheffler@scheffleContributor

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 Feb 04, 2021 by Arne Scheffler
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking