Please support Angular CLI sourcemaps generated in Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0-rc2-final
This suggestion is migrated to Developer Community. Please use below link to view the current status.
Pete Davis commented
Using 2.2 preview still doesn't seem to work.
+1 for this. Creating angular project with .NET core 2.0 works fine, but .NET 2.1 with the new (better) solution setup does not debug.
I've been able to set a breakpoint in Chrome (under the webpack:// node), hit it, then set other breakpoints in Visual Studio. It seems that hitting the first breakpoint in Chrome is helping VS get things set up. No combination of settings in package.json ("start": "ng serve --source-map=true --eval-source-map=false",) or enabling / disabling "Generate source maps" in the property pages seems to help.
John Pankowicz commented
The new SPA templates add a lot of value to developing SPAs using a Asp.Net backend. But not being able to debug Typescript in Visual Studio is a show stopper.
I have VS Pro 15.6.4. This problem is easy to reproduce.
Install the new SpaTemplates:
dotnet new --install Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0
Create a new project
dotnet new angular -o my-new-app
Open the project in Visual Studio.
Set a breakpoint on line "this.currentCount++" in file "ClientApp\src\app\app.component.ts".
Hit F5. Navigate to "Counter" page and hit "Increment"
Breakpoint will not be hit. The breakpoint is an open red circle and hovering shows
"No code has been loaded for this location".
Steve W commented
Same problem. I'm using the Angular VS 2017 template described here: https://docs.microsoft.com/en-us/aspnet/core/spa/angular?tabs=visual-studio. Can set breakpoints, but no symbols are loaded.
Frank H commented
i think there is the same issue with webpack-cli in webpack 4. can't debug in VS 2017 IDE but can in chrome web developer
Debugging within VS2017 with breakpoints is definitively a must-have...
Mathieu Laprise commented
+ 1 for this. I'd be a really nice bugfix to have.
Stuart Smith commented
since @angular/cli 1.5 sourcemaps are integrated into main js bundles when running ng serve - it seems visual studio is unable to pick them up.
i can fix in development by downgrading the cli to 1.4.9 however i can't publish into production -
angular 5 won't build without cli 1.5.