question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DustinCampbellcommented, Apr 5, 2016

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

0reactions
DustinCampbellcommented, Apr 5, 2016

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot .NET tool usage issues - Microsoft Learn
NET tool fails to run, most likely you ran into one of the following issues: The executable file for the tool wasn't found....
Read more >
Unable to find an entry point named 'SystemNative_RealPath ...
After installing the latest dotnet cli on OS X: . ... the latest sample MVC app: https://github.com/aspnet/cli-samples/tree/master/HelloMvc ...
Read more >
"Unable to attach to CoreCLR" when debugging a ...
When I want to debug a newly created .NET 6 console app, which has <PublishSingleFile>true</PublishSingleFile>. then I get the error message “Unable to ......
Read more >
Error while installing .NET Core Debugger on OSX
When I installed the newest yo generator for aspnet and created a sample app, it runs fine. When I try to open that...
Read more >
Run and debug .NET Core and ASP.NET Core apps with ...
The example below shows a sample launchSettings.json with two launch profiles: IIS Express and Sample . { "iisSettings": ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found