dotnet / dotnet/sdk

`dotnet --debug` switch no longer works (unix)

Open
#52,471 3 comments 1 reaction 2 assignees Claimed by @nagilson View on GitHub
Area-CLI
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

When we now try to run our `--debug` flag as defined by `src/Cli/Microsoft.DotNet.Cli.Utils/DebugHelper.cs`, the flag doesn't work and we get a failure with:

`./artifacts/bin/redist/Debug/dotnet/dotnet --debug --info`
```
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but dotnet---debug does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
```

However, it seems that skipping the native host resolution re-enables the flag to work:
`./artifacts/bin/redist/Debug/dotnet/dotnet exec ./artifacts/bin/redist/Debug/dotnet/sdk/10.0.103-dev/dotnet.dll --debug --info`

My understanding is that there was some change to the host that caused this. I thought it was the tool lookup logic or the `-` conversion lookup, but I'm not sure.

Maybe I'm also doing something wrong but it seems busted to me. Seems like it may be a linux issue, so it may also have never worked on unix.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.