Pass command line args to a Docker debugging run of a .NET Core console application in Visual Studio Container Tools

In Visual Studio 2019, I can debug a .NET Core console application with command line arguments using a configuration similar to below in launchSettings.json.

{
  "profiles": {
    "MyConsoleApp": {
      "commandName": "Project",
      "commandLineArgs": "-a -v"
    }
  }
}

I would like to be able to debug this using Visual Studio Container Tools inside of a Docker container. I added another build profile to launchSettings.json as follows:

{
  "profiles": {
    "Docker": {
      "commandName": "Docker",
      "commandLineArgs": "-a -v"
    },
    "MyConsoleApp": {
      "commandName": "Project",
      "commandLineArgs": "-a -v"
    }
  }
}

This successfully builds and runs the console application per the defined Dockerfile, however the docker run command does not include the values specified in commandLineArgs in the Docker profile of launchSettings.json.

The generated docker run command (notably without -a -v):

docker run -dt -v "C:UsersMyUservsdbgvs2017u5:/remote_debugger:rw" -v "C:UsersMyUsersourcereposMyConsoleAppsrcMyConsoleApp:/app" -v "C:UsersMyUser.nugetpackages:/root/.nuget/fallbackpackages2" -v "C:Program FilesdotnetsdkNuGetFallbackFolder:/root/.nuget/fallbackpackages" -e "DOTNET_USE_POLLING_FILE_WATCHER=1" -e "ASPNETCORE_ENVIRONMENT=Development" -e "NUGET_PACKAGES=/root/.nuget/fallbackpackages2" -e "NUGET_FALLBACK_PACKAGES=/root/.nuget/fallbackpackages;/root/.nuget/fallbackpackages2" --entrypoint tail myconsoleapp:dev -f /dev/null

Question:

How can I pass command line args to a Docker debugging run of a .NET Core console application in Visual Studio Container Tools?

Update:

Just stumbled on this.

When I add something like this to my project file:

<DockerDebuggeeArguments>-a -v</DockerDebuggeeArguments>

The console app fails to debug at all with the following message:

-------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
  https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.
The program 'dotnet' has exited with code 145 (0x91).

I have Microsoft .NET Core SDK 2.2.301 (x64) installed.

If I exclude the DockerDebuggeeArguments value, I can debug in Docker, but no command line arguments are passed in.

Source: StackOverflow