The existing highlighting mechanism relies on DOM elements.
This has some implications like introducing layout thrashing
since each highlight adds/removes elements to and from the tree.
This change converts the higlighter to HTML canvas renderer which
should introduce minimal performance overhead when inspecting the app.
PR Close#71046
Split the `directive-forest/component-tree` logic into other modules and
utilities. `component-tree` was the only remnant of the legacy BE code
organization. The refactor doesn't change any logic, but converts some
remaining arrow functions to standard functions and performs a few renames.
Remove all prefixes of private members to match the currently followed convention.
Remaining places that still use underscores (excluded from the refactor):
- `tab-update/index.ts`
- `splitArea.directive.ts` (part of the old vendor code)
When a user cancels Chrome's debugging infobar while a signal breakpoint is active, `chrome.debugger.onDetach` clears the active breakpoints map in the background service worker. Previously, the DevTools panel UI was not notified of this event, leaving the breakpoint icon displayed as active, and subsequently clicking to disable it threw an error because the entry was already absent from `activeBreakpoints`.
This change:
1. Broadcasts a `signalBreakpointsCleared` message from `BreakpointManager` when `chrome.debugger.onDetach` fires so `SignalGraphPaneComponent` immediately clears its active breakpoints state.
2. Makes `BreakpointManager.removeBreakpoint` return early as a no-op if the breakpoint or tab entry is already absent.
Fixes#70949
Avoid asserting on chrome.devtools.inspectedWindow.eval directly via
Jasmine matchers, as TypeScript picks up the 3-argument overload
signature from @types/chrome, causing a TS2554 compilation error when
only 2 arguments are provided. Instead, assert directly on the
evalSpy instance.
Explicitly validate sender.origin and sender.url, guard against non-object
or missing sender properties, and add comprehensive unit test coverage
for all optional property permutations of chrome.runtime.MessageSender.
Ensure runtime messages for setting and querying signal breakpoints
originate strictly from the extension's internal DevTools panel context,
preventing untrusted web pages or content scripts from triggering debugger
attachments or placing breakpoints.
- Validate sender.id, sender.tab (must be undefined), and sender.url.
- Validate tabId to ensure it is a positive integer.
- Detach chrome.debugger when all breakpoints on a tab are removed.
- Namespace scriptMap by tabId to prevent cross-tab script collisions.
- Add unit test suite in breakpoint_manager.spec.ts.
- Unify the multiple scattered feature-specific flags into a single
global backend config
- Fix initial settings data exchange between the fe and be on prod
`app.component.spec.ts` has been in the tree since the initial DevTools commit
in 2020, but no revision of `shell-browser/src/app/BUILD.bazel` has ever listed
it, and that file has no globs. Two of the three specs in the directory are
wired up; this one has never run.
It could not run as written. The setup declared `AppComponent` and imported
`RouterModule.forRoot([])`, neither of which applies now that the component is
standalone and injects `MessageBus` and `DEEP_LINK_INSTANCE_ID`.
It now stubs the `chrome.devtools` surface that `ngOnInit` reads and covers
both lifecycle hooks: the listeners registered on init, the two performance
track emits, the three guards on the deep link listener, and the listeners
removed on destroy.
Follow-up to #70570, which fixed the same problem in ng-devtools-backend.
Implements persistent breakpoints for Angular signal consumers (computeds and effects) in Angular DevTools using Chrome DevTools Protocol (CDP).
- Adds debugger permission to Chrome and Firefox extension manifests.
- Implements CDP breakpoint orchestration in background script.
- Updates SignalDetailsComponent and SignalGraphPaneComponent with label icon toggle and persistent state sync across reloads.
This fixes a regression introduced by #69309 where the format of `serializedId` from a coma separated string, to a JSON representation of an array.
fixes#70104
Conditionally update the browser DevTools tab name to "Angular & Wiz" if the user is identified as a Google employee via internal corp network detection.
Rename Timing API to Performance Track to better reflect the purpose of the actual feature;
Migrate the settings data object to match the new name and drop some redundant keys.
Enables direct navigation to Angular components from the Chrome Performance panel's flame graph.
This feature integrates Angular DevTools with Chrome's `setOpenResourceHandler` by registering a custom URL scheme (`angular-devtools://component/{instanceId}`).
Closes#63960
Add an optional injector property to the DevToolsNode and IndexedNode types. Features that require an injector use the injector stored on the node, if it exists, and fall back to getInjectorFromElementNode if it doesn't.
In the context of AOT tests, component with defer blocks no longer throw on instanciation if the component is not overridden (with `overrideComponent`)
Prior to this change, all components with a `@defer` block would throw if `compileComponents` was not invoked.
In none-JIT apps, this change makes `compileComponents()` uneccesary.
Client-Only Wiz doesn't have the concept of a directive. Once the new ng.getComponentForest function is implemented, Client-Only Wiz cowilluld provide `ComponentTreeNode`s without a `directives`` property. This change supports that case by making the `directives` property optional.
Destroy uses window.removeEventListener but the ChromeMessageBus doesn't actually depend on a window object.
In practice this code is unlikely to ever be reached. If a tab is closed the entire context script JS process is killed so this is not an bug that would be very common or even reachable. That being said for correctness this should not be using window.
Fixed misspellings in test descriptions in devtools/projects/shell-browser/src/app/tab_manager_spec.ts: recieved/recieves → received/receives in three it(...) titles.
Update the `esbuild` macro in devtools to use
`external` sourcemaps by default and remove the ability to override the `sourcemap` and `sources_content` options.
This change is necessary to ensure that the build is deterministic and 100% reproducible as otherwise Firefox will not publish the build.
This disables esbuild minification when building DevTools in debug mode, introducing a new `//devtools:debug` flag and a `pnpm run devtools:build:chrome:dev` script to trigger it. This should make debugging a little easier.