| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Angular DevTools is a browser DevTools extension for debugging and profiling Angular applications.
Follow the instructions below to set up your Angular DevTools development environment. Note that all commands should be executed in the repository root, not devtools/. All file paths are also relative to the repository root.
Debian Linux, MacOS, and Windows via WSL should build successfully. Building natively on Windows without WSL is not supported at the moment.
To set up your development environment, first install the correct version of Node. If you have nvm set up, this can be done with:
nvm installSecond, install pnpm:
npm install -g pnpmThird, install NPM dependencies:
pnpm install --frozen-lockfileNow you should be ready to build the DevTools extension.
To run the extension in development mode run:
pnpm devtools:devserverThis would start a development server that you can access on http://localhost:4200. In development, Angular DevTools uses a "development shell." This is different from "chrome shell" in a way, that it runs the user's app in an iframe. DevTools then communicate with the user's app via message passing.
To actually build and install as a real browser extension in dev mode, use:
pnpm devtools:build:chrome:debugThis will build the extension at dist/bin/devtools/projects/shell-browser/src/prodapp. Then go to chrome://extensions, enable developer mode, and click "Load unpacked" to load the extension from that directory.
Whenever you rebuild the extension, make sure to reload the extension in chrome://extensions, right click on the Angular DevTools panel and click "Reload frame", and refresh the page you're inspecting to make sure changes are applied.
For how the panel, background worker, content scripts, and backend connect per tab and pass messages, see docs/connection.md.
Depending on which script you want to debug, you can find them in different locations. In debug mode, these should all have sourcemaps loaded and be unminified.
To enable sourcemaps you need to add the sourcemap = "inline" flag to the esbuild macro located in tools/defaults.bzl.
Before running end-to-end tests, you need to start the development server using:
pnpm devtools:devserverYou have two options for running cypress, you can use the interactive cypress UI or you can run Cypress in headless mode.
To open Cypress for Angular DevTools in interactive mode, run:
pnpm devtools:e2e:openTo run Cypress tests headless, use:
pnpm devtools:test:e2eYou can build the release version of Angular DevTools for either Chrome or Firefox with:
pnpm devtools:build:chrome:release
pnpm devtools:build:firefox:releaseEither way, the built extension will be at dist/bin/devtools/projects/shell-browser/src/prodapp.
For Chrome, you can install the extension from dist/bin/devtools/projects/shell-browser/src/prodapp by following the guide from here.
For Firefox, to load the extension, you can go to the about:debugging page, click the "This Firefox" option and then click the Load Temporary Add-on button. You'll have to select the manifest file in dist/bin/devtools/projects/shell-browser/src/prodapp directly.
| Back | FazBrowse Home | New Git URL |