Full answer
Angular DevTools is an extension for Chrome and Firefox. It adds an "Angular" tab to the browser developer tools. It works with Angular apps that run in development mode (a production build hides most information).
Tabs and what they are good for:
- Components. Shows the component tree of the page. Click a component to see its inputs, outputs, and the current values of its fields, including signals (it can show the value of a signal and edit simple values). You can also jump to the component's source. Use it to answer "what data does this component really have right now?" and "which parent passes this input?".
- Profiler. Record, interact with the page, then stop. It shows each change detection pass as a bar with its time, and which components were checked and how long each took. Use it to find passes that run too often (a timer or scroll listener inside the zone) or components that are slow to check. Compare before and after a fix.
- Injector tree. Shows the hierarchy of injectors (element injectors, environment injectors) and the providers in each, which helps when you ask why a component gets a certain instance of a service.
- Router tree (in newer versions). Shows the route configuration and the active route.
Other debugging tools to know:
- The browser debugger with source maps: set breakpoints in TypeScript.
console.logand thejsonpipe in a template for a quick look:{{ student | json }}.- The
ngglobal in development:ng.getComponent(element),ng.applyChanges(component). - Reading error codes (
NG0100) and the docs page for each. - The Network tab for HTTP problems, and the Performance tab for slow interactions.
Habits: reproduce the problem, check data in the Components tab, check how often passes run in the Profiler, and only then change code.
typescript
import { Component, computed, signal } from '@angular/core';
import { JsonPipe } from '@angular/common';
@Component({
selector: 'app-debug-me',
imports: [JsonPipe],
template: `
<button type="button" (click)="addMarks()">Add 5 marks</button>
<pre>{{ summary() | json }}</pre>
`,
})
export class DebugMeComponent {
readonly name = signal('Asha');
readonly marks = signal(70);
// In DevTools you can see both signals and this computed value, and edit marks.
readonly summary = computed(() => ({ name: this.name(), marks: this.marks() }));
addMarks(): void {
this.marks.update((m) => m + 5);
}
}Angular 20.3. DevTools is a browser extension, so it was not run here. The sample is a component with a signal that you can inspect, and the `json` pipe line was type-checked.
Key points
- Angular DevTools adds Components, Profiler and Injector views to the browser tools.
- Components shows inputs, outputs and signal values. The Profiler shows change detection passes and timings.
- It needs a development build. Use it with the browser debugger and `ng` helpers.
- Reproduce, inspect data, measure passes, then fix.
Common mistakes
- Trying to profile a production build and finding little data.
- Guessing at performance problems without recording a profile.
- Adding `console.log` in many places instead of checking the Components tab.
Follow-ups
- What would you look for if the Profiler shows hundreds of passes per second?
- How does the injector tree help with provider problems?
- What does the `ng` global offer in development?
Tips
- Name the three tabs with one use each.
- Mention that it needs development mode.
- Say how you combine it with the browser debugger.
Evaluation rubric
- Describes the main tabs and their use.
- Knows the development mode limit.
- Combines DevTools with other debugging tools.