Debugging with Visual Studio Code

You can also debug your Angular application, Karma, and Protractor tests from directly within Visual Studio Code. First, you need to configure the debugger to work with a Chrome debugging environment, as illustrated:

VS Code Debugging Setup
  1. Click on the Debug pane
  2. Expand the No Configurations dropdown and click on Add Configuration...
  3. In the Select Environment select box, select Chrome

This will create a default configuration in the .vscode/launch.json file. We will modify this file to add three separate configurations.

  1. Replace the contents of launch.json with the following configuration:
.vscode/launch.json ...

Get Angular 6 for Enterprise-Ready Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.