[OS X] Unable to debug sample HelloMvc app with latest dotnet CLI
See original GitHub issueAlthough 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:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can install a VSIX into VS Code with File->Open File. It totally works on OS X, Linux and Windows.
Since we’ve got downloadable bits, I’ll go ahead and close this.