Skip to content

.NET project names with spaces fail to debug (both SDK and Dockerfile) on Linux #169

@bwateratmsft

Description

@bwateratmsft

Repro steps:

  1. Be on Linux. The behavior is different there.
  2. Create a folder with a space in the name
  3. Go into that folder, dotnet new mvc
  4. Open VSCode to that folder
  5. Debug in container (by doing SDK or by adding Dockerfiles first)
  6. The container starts but VSDBG in the container fails to launch the app executable

I suspect the right fix is to use our commandLineBuilder tech in here:

args: debugConfiguration.args || [additionalProbingPathsArgs, containerAppOutput].join(' '),

As far as I can tell, the coreclr launch configuration does accept a string array of args instead of a flat string. However, we would need to rewrite a few things, namely:

private static getAdditionalProbingPathsArgs(platformOS: PlatformOS): string {
const additionalProbingPaths = platformOS === 'Windows'
? [
'C:\\.nuget\\packages',
'C:\\.nuget\\fallbackpackages'
]
: [
'/root/.nuget/packages',
'/root/.nuget/fallbackpackages'
];
return additionalProbingPaths.map(probingPath => `--additionalProbingPath ${probingPath}`).join(' ');
}

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions