Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OS X] Unable to debug sample HelloMvc app with latest dotnet CLI #144

Closed
miguellira opened this issue Apr 5, 2016 · 6 comments
Closed
Labels

Comments

@miguellira
Copy link

Although I'm able to properly restore, build, and run the ASP.NET sample CLI HelloMvc app with the latest dotnet CLI, I am unable to properly debug it in VS Code.

Steps to reproduce

git clone https://github.com/aspnet/cli-samples.git
dotnet restore
dotnet build
code .
fn+F5 and modify the program and args properties of launch.json to point to your dotnet executable and DLL accordingly (see sample below)

{
            "name": ".NET Core Launch (web)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "",
            "program": "/usr/local/share/dotnet/dotnet",
            "args": ["exec /Users/miguellira/Documents/Github/aspnet/cli-samples/HelloMvc/bin/Debug/netcoreapp1.0/HelloMvc.dll",
                     "--additionalprobingpath /Users/miguellira/.nuget/packages"],
            ...[snip]
}

start debugger

Expected behavior

VS Code launches browser and attaches debugger

Actual behavior

VS Code launches browser but the HelloMvc app cannot find Index.cshtml.

InvalidOperationException: The view 'Index' was not found. The following locations were searched:
/Views/Home/Index.cshtml
/Views/Shared/Index.cshtml

Enviornment info

.NET Command Line Tools (1.0.0-beta-002205)

Product Information:
 Version:     1.0.0-beta-002205
 Commit Sha:  f665c28173

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.11
 OS Platform: Darwin
 RID:         osx.10.11-x64
@DustinCampbell
Copy link
Member

You should update your .NET Core SDK bits to the latest. There's been a lot of churn over the past few days.

If you install the latest C# extension from https://github.com/OmniSharp/omnisharp-vscode/releases/download/v0.3.9/csharp-0.3.9.vsix into VS Code, you will get a prompt to automatically generate launch.json and tasks.json. Once this is done, F5 works properly for me on OS X. I hit a breakpoint and everything. 😄

@miguellira
Copy link
Author

@DustinCampbell I've been following the latest changes. Thanks.

As far as I know VSIX is not supported by OS X. Is there any documentation out there for manually installing 0.3.9 of omnisharp-vscode? I've only used the built-in package manager.

@DustinCampbell
Copy link
Member

You can install a VSIX into VS Code with File->Open File. It totally works on OS X, Linux and Windows.

@miguellira
Copy link
Author

Awesome! Learn something new every day!

@miguellira
Copy link
Author

@DustinCampbell Thanks for the help. F5 on OS X without any issue. 🎉

Not sure if its worth keeping this issue open until 0.3.9 or the next stable build goes live.

@DustinCampbell
Copy link
Member

Since we've got downloadable bits, I'll go ahead and close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants