Introduction
In this article, we will learn how to debug an Angular 11 application in Visual Studio code.
Step 1 - What is Debugging?
Debugging is key to building any application.
Using the debugger in any file on our codebase will cause the application to break at the point where the statement is set. There are a few things we could do to avoid creating bugs from a developer's point of view.
Example:
Defensive Programming or Test-Driven Development.
Debugging an application is a key skill for developers, and speeds up the process of remove bugs and delivering the application.
How to debug Angular in Visual studio code (short note)
- Create an Angular application
- Click on Extension then Install Debugger for Chrome
- Configure Debug port in Environment
- Add a pointer
- Start Debugging
Step 2 - How to Install the Debugger for Chrome extension in VS Code
In Header navigation, click on the View Open Extension menu in Visual Studio Code:
Or directly click on sidenavabar extension (ctrl+shift+X) then search the debugger for chrome and install the extension.
Step 3
This extension is provided by Microsoft
Create a launch.json config file
The launch.json file should look like this, with values changed to reflect your environment,
Set the angular port in the URL
- {
- "version": "0.2.0",
- "configurations": [
- {
- "type": "pwa-chrome",
- "request": "launch",
- "name": "Launch Chrome against localhost",
- "url": "http://localhost:1234",
- "webRoot": "${workspaceFolder}"
- }
- ]
- }
Step 4
Now we can see a Debugger button in the left sidebar of vscode. Select Chrome as the environment.

Join the conversation! Your thoughts help the community grow.