Now I'm using Webstorm to code and debug Angular but I don't like this IDE. Is there any way to debug angular with VS 2017 ?
Build the Angular 2 application using the folllowing steps, First => make your index.html file as your start up page. Right-click on src/index.html file in the solution explorer and select option “Set As Start Page”. To run your Angular project using Visual Studio via F5, you need to make the following changes,
Step 1 - Create a database (SQL Server). Step 3 - Create a connection with SQL and get data from SQL using Web API. Step 4 - Setup angular2 with Web API. Step 5 - Bind drop-down using Angular 2. Visual Studio 2017. TypeScript (2.2 or greater). Now, set up Angular 2 files with Visual Studio.
In the Attach to Process dialog box, get a filtered list of browser instances that you can attach to. In Visual Studio 2019, choose the correct debugger for your target browser, JavaScript (Chrome) or JavaScript (Microsoft Edge - Chromium) in the Attach to field, type chrome or edge in the filter box to filter the search results.
Thank you. You can debug JavaScript and TypeScript code using Visual Studio. You can set and hit breakpoints, attach the debugger, inspect variables, view the call stack, and use other debugging features. If you haven't already installed Visual Studio, go to the Visual Studio downloads page to install it for free.
You can debug Angular inside VS2017. Except there are issues not yet resolved. One is that currently you need to set your breakpoints after you start debugging. (I have VS Pro v15.4.1) To see an example of debugging do the following:
Create a project as a Asp.Net Core Web Application and select the "Angular" project template.
Click the down-arrow next to "IIS Express" and set the Web Browser to Google Chrome.
Start debugging. Chrome will display a message about script debugging being enabled. Eventually your app will displace this message.
Set a breakpoint on "this.currentCount++;" in counter.component.ts.
Navigate to the Counter screen and click "Increment". Your breakpoint will be hit.
Make sure that you do not also have the Chrome Developer tools running at the same time (F12 tools).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With