Omnisharp-vscode: Debugger launch may fail with '/usr/local/share/dotnet' does not exist'

Created on 2 Dec 2017  路  9Comments  路  Source: OmniSharp/omnisharp-vscode

Environment data

dotnet --info output:

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.3
  Build    : a9190d4a75f4a982ae4b4fa8d1a24526566c69df

VS Code version: Version 1.18.1 (1.18.1)
C# Extension version: 1.13.1

Steps to reproduce

Use osx
Install VSC, extension.
Download dotnet core form site and use the install to setup.

Expected behavior

Run the debugger

Actual behavior

having the same issue:
Displays the error after trying to debug.

launch: program '/usr/local/share/dotnet' does not exist.

screen shot 2017-12-01 at 6 46 10 pm

I can run dotnet from internal terminal or OSX terminal. It also works if I assigned the debugger to an existing process, but doesn't work debugging a new one.

Bug Debugger Resolved-Fixed

All 9 comments

@MBLHarrison your issue is NOT similar. Please open a new issue.

@sourcesoft it looks like your problem is that the debugger things the path to the dotnet executable is /usr/local/share/dotnet, but on OSX in my experience it is actually /usr/local/share/dotnet/dotnet (note the extra `dotnet'). So the debugger is pointing at a directory instead of a file.

If you look at your PATH, is /usr/local/share in it ahead of /usr/local/share/dotnet?

I just ran where dotnet in terminal:

/usr/local/bin/dotnet

So it actually runs the one in local/bin. And I also have /usr/local/share/dotnet folder with with a binary dotnet just like you said that I can also run like ./dotnet in there.
screen shot 2017-12-01 at 7 24 57 pm

In the error I mentioned launch: program '/usr/local/share/dotnet' does not exist. it seems like it uses share folder path but I'm not sure why

Is /usr/local/share on your PATH?

The debugger does its owns processing of PATH to find dotnet, and I am guessing you are running into a bug in our parsing of it.

Yes I have it
screen shot 2017-12-01 at 7 32 18 pm

And also the one in /usr/local/bin is just a symlink to the right path of dotnet
screen shot 2017-12-01 at 7 30 17 pm

Okay, good. I should be able to repro this then. I will try to get the debugger fixed up for our next release. In the mean time, if you can swap the order of /usr/local/share and /usr/local/bin I think this will go away.

Oh it got worse. I just tested Visual Studio for Mac and it's getting me the same error text in a new solution/project, so it's not specific to VSC.

screen shot 2017-12-01 at 7 34 52 pm

Both VS for Mac and VS Code use the same underlying debugger. So that makes sense.

I just swapped the order it got fixed in both of them. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mshinnie picture mshinnie  路  3Comments

yufeih picture yufeih  路  3Comments

tstivers1990 picture tstivers1990  路  3Comments

olfek picture olfek  路  3Comments

gregg-miskelly picture gregg-miskelly  路  3Comments