RickStrahl / AlbumViewerVNext

West Wind Album Viewer ASP.NET Core and Angular Sample
505 stars 353 forks source link

How do you debug typescript when the project is not a csproj ? #5

Closed punkouter2021 closed 7 years ago

punkouter2021 commented 7 years ago

The dotnet new angular example is easy because I can just set a breakpoint and run.

But in VS2017 I cannot F5 run it and I guess it uses webpack so I can't debug in the browser.. Is there some simple way to set a break point on the typescript ? (I can use VS code if that is the easiest way)

RickStrahl commented 7 years ago

The browser should let you step through typescript. Just use Chrome or FireFox debugging tools. Not sure about IE or Edge, but both Chrome and FF work with script maps to present the proper typescript code to step through.

Just add a debugger statement or set breakpoints in the respective debuggers.

VS 2017 should also allow you to attach directly to the Chrome Debugger.