{"id":13527617,"url":"https://github.com/microsoft/vscode-chrome-debug","last_synced_at":"2025-10-05T12:32:22.711Z","repository":{"id":38326053,"uuid":"45425758","full_name":"microsoft/vscode-chrome-debug","owner":"microsoft","description":"Debug your JavaScript code running in Google Chrome from VS Code.","archived":true,"fork":false,"pushed_at":"2022-12-02T15:12:33.000Z","size":39417,"stargazers_count":2206,"open_issues_count":9,"forks_count":360,"subscribers_count":97,"default_branch":"master","last_synced_at":"2025-10-02T00:39:29.246Z","etag":null,"topics":["chrome","chrome-debugging-protocol","debugger","editor","vscode"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2015-11-02T22:17:23.000Z","updated_at":"2025-09-26T17:13:03.000Z","dependencies_parsed_at":"2023-01-22T22:31:27.677Z","dependency_job_id":null,"html_url":"https://github.com/microsoft/vscode-chrome-debug","commit_stats":null,"previous_names":[],"tags_count":132,"template":false,"template_full_name":null,"purl":"pkg:github/microsoft/vscode-chrome-debug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fvscode-chrome-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fvscode-chrome-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fvscode-chrome-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fvscode-chrome-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/vscode-chrome-debug/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fvscode-chrome-debug/sbom","scorecard":{"id":93874,"data":{"date":"2022-08-15","repo":{"name":"github.com/microsoft/vscode-chrome-debug","commit":"6b5bdeb4fe05912797b345216c8a6d5196be666f"},"scorecard":{"version":"v4.5.0-26-g10b6052","commit":"10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93"},"score":6.7,"checks":[{"name":"Maintained","score":1,"reason":"2 commit(s) out of 30 and 0 issue activity out of 0 found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#maintained"}},{"name":"Code-Review","score":3,"reason":"GitHub code reviews found for 10 commits out of the last 30 -- score normalized to 3","details":["Warn: no reviews found for commit: 41b51844d1b96f7a369c765f531b5a98a0c6eea3","Warn: no reviews found for commit: 36aadaf20e7dee14a269d253302050a41d68af1b","Warn: no reviews found for commit: e33b596a8bee5da1d729355d9703388c5be5b168","Warn: no reviews found for commit: 20203f217efff04f8189069f531aa7d36ec1a7d4","Warn: no reviews found for commit: b9dd5411931ec9425cea16537d83c7f489f9382d","Warn: no reviews found for commit: 385ef4094e237ac4f37adc57a6cdaec0c0eebd6e","Warn: no reviews found for commit: 86db792d13550538022e0ecea5d999e93c5f5124","Warn: no reviews found for commit: c9bb7d2d793eeeefe06535baa39a4a4620a8ff91","Warn: no reviews found for commit: aba968f7655d876f4f143d635c8b8183bf6f6b3d","Warn: no reviews found for commit: 4e5ac2e967c9a95af26c82aee324f3d0f48f13be","Warn: no reviews found for commit: c8809eb3d2065152791d7ade4f58313f6482793d","Warn: no reviews found for commit: da2d8f6b2ce5792e8d708d446351386cb09eec1c","Warn: no reviews found for commit: 499f5bab0d637df5b915dadcd8772d67dd5f1077","Warn: no reviews found for commit: 0e2ae76106cf075a0818911d3ed15a2f2d811cce","Warn: no reviews found for commit: 581317798cb615adb37e0751676d682f9d16590a","Warn: no reviews found for commit: 453a5c10ae5ab5dd05208291fe40eed3470af3ed","Warn: no reviews found for commit: afc6b92aeeda89ce9d804fec14ee8e78576ec06e","Warn: no reviews found for commit: ef6f9690f95d1846509582acb44133a13c57ae8b","Warn: no reviews found for commit: 9774e4ae3a75825f7d580bb64e15f3fb3bac3f05","Warn: no reviews found for commit: 6cb4156f0f5806ee945ea298728da38be1bf9e37"],"documentation":{"short":"Determines if the project requires code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no badge detected","details":null,"documentation":{"short":"Determines if the project has a CII Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"no vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#vulnerabilities"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"no published package detected","details":["Warn: no GitHub publishing workflow detected"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":10,"reason":"tokens are read-only in GitHub workflows","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#token-permissions"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: : LICENSE.txt:1"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info: GitHub-owned GitHubActions are pinned","Info: Third-party GitHubActions are pinned","Info: Dockerfile dependencies are pinned","Info: no insecure (not pinned by hash) dependency downloads found in Dockerfiles","Info: no insecure (not pinned by hash) dependency downloads found in shell scripts"],"documentation":{"short":"Determines if the project has declared and pinned its dependencies.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":["Warn: no GitHub releases found"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#branch-protection"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#binary-artifacts"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: Dependabot detected"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#dependency-update-tool"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":null,"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy detected in org repo: github.com/microsoft/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-15T08:28:04.340Z","repository_id":38326053,"created_at":"2025-08-15T08:28:04.340Z","updated_at":"2025-08-15T08:28:04.340Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278358479,"owners_count":25973946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chrome","chrome-debugging-protocol","debugger","editor","vscode"],"created_at":"2024-08-01T06:01:54.238Z","updated_at":"2025-10-05T12:32:21.396Z","avatar_url":"https://github.com/microsoft.png","language":"TypeScript","readme":"## :rotating_light: Important\n\nThis extension has been deprecated as Visual Studio Code now has a [bundled JavaScript Debugger](https://github.com/microsoft/vscode-js-debug) that covers the same functionality. It is a debugger that debugs Node.js, Chrome, Edge, WebView2, VS Code extensions, and more. You can safely un-install this extension and you will still be able to have the functionality you need.\n\nPlease file any issues you encounter in [that repository](https://github.com/microsoft/vscode-js-debug).\n\n---\n\n\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n    \u003cimg src=\"https://github.com/Microsoft/vscode-chrome-debug/blob/master/images/icon.png?raw=true\" alt=\"logo\" width=\"200\"\u003e\n  \u003cbr\u003e\n  VS Code - Debugger for Chrome\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003eDebug your JavaScript code running in Google Chrome from VS Code.\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://vscode.visualstudio.com/1e32b5a6-a974-467b-9d5f-f47e49589c5e/_build/definition?definitionId=9\"\u003e\u003cimg src=\"https://vscode.visualstudio.com/_apis/public/build/definitions/1e32b5a6-a974-467b-9d5f-f47e49589c5e/9/badge\" alt=\"vsts\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome\"\u003e\u003cimg src=\"https://vsmarketplacebadge.apphb.com/version/msjsdiag.debugger-for-chrome.svg?label=Debugger%20for%20Chrome\" alt=\"Marketplace bagde\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://gitter.im/Microsoft/vscode-chrome-debug?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\"\u003e\u003cimg src=\"https://badges.gitter.im/Microsoft/vscode-chrome-debug.svg\" alt=\"Release\"\u003e\u003c/a\u003e\n\n\u003c/p\u003e\n\nA VS Code extension to debug your JavaScript code in the Google Chrome browser, or other targets that support the [Chrome DevTools Protocol](https://chromedevtools.github.io/debugger-protocol-viewer/).\n\n![Demo](https://github.com/Microsoft/vscode-chrome-debug/blob/master/images/demo.gif?raw=true)\n\n**Supported features**\n* Setting breakpoints, including in source files when source maps are enabled\n* Stepping, including with the buttons on the Chrome page\n* The Locals pane\n* Debugging eval scripts, script tags, and scripts that are added dynamically\n* Watches\n* Console\n\n**Unsupported scenarios**\n* Debugging web workers\n* Debugging Chrome extensions\n* Any features that aren't script debugging\n\n## Getting Started\n1. [Install the extension](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome)\n2. Open the folder containing the project you want to work on.\n\n## Using the debugger\n\nWhen your launch config is set up, you can debug your project. Pick a launch config from the dropdown on the Debug pane in Code. Press the play button or F5 to start.\n\n### Configuration\n\nThe extension operates in two modes - it can launch an instance of Chrome navigated to your app, or it can attach to a running instance of Chrome. Both modes requires you to be serving your web application from local web server, which is started from either a VS Code task or from your command-line. Using the `url` parameter you simply tell VS Code which URL to either open or launch in Chrome.\n\nJust like when using the Node debugger, you configure these modes with a `.vscode/launch.json` file in the root directory of your project. You can create this file manually, or Code will create one for you if you try to run your project, and it doesn't exist yet.\n\n\u003e **Tip**: See recipes for debugging different frameworks here: https://github.com/Microsoft/vscode-recipes\n\n### Launch\nTwo example `launch.json` configs with `\"request\": \"launch\"`. You must specify either `file` or `url` to launch Chrome against a local file or a url. If you use a url, set `webRoot` to the directory that files are served from. This can be either an absolute path or a path using `${workspaceFolder}` (the folder open in Code). `webRoot` is used to resolve urls (like \"http://localhost/app.js\") to a file on disk (like `/Users/me/project/app.js`), so be careful that it's set correctly.\n```json\n{\n    \"version\": \"0.1.0\",\n    \"configurations\": [\n        {\n            \"name\": \"Launch localhost\",\n            \"type\": \"chrome\",\n            \"request\": \"launch\",\n            \"url\": \"http://localhost/mypage.html\",\n            \"webRoot\": \"${workspaceFolder}/wwwroot\"\n        },\n        {\n            \"name\": \"Launch index.html\",\n            \"type\": \"chrome\",\n            \"request\": \"launch\",\n            \"file\": \"${workspaceFolder}/index.html\"\n        },\n    ]\n}\n```\n\nIf you want to use a different installation of Chrome, you can also set the `runtimeExecutable` field with a path to the Chrome app.\n\n### Attach\nWith `\"request\": \"attach\"`, you must launch Chrome with remote debugging enabled in order for the extension to attach to it. Here's how to do that:\n\n__Windows__\n* Right click the Chrome shortcut, and select properties\n* In the \"target\" field, append `--remote-debugging-port=9222`\n* Or in a command prompt, execute `\u003cpath to chrome\u003e/chrome.exe --remote-debugging-port=9222`\n\n__macOS__\n* In a terminal, execute `/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --remote-debugging-port=9222`\n\n__Linux__\n* In a terminal, launch `google-chrome --remote-debugging-port=9222`\n\nIf you have another instance of Chrome running and don't want to restart it, you can run the new instance under a separate user profile with the  `--user-data-dir` option. Example: `--user-data-dir=/tmp/chrome-debug`. This is the same as using the `userDataDir` option in a launch-type config.\n\nLaunch Chrome and navigate to your page.\n\nAn example `launch.json` file for an \"attach\" config.\n```json\n{\n    \"version\": \"0.1.0\",\n    \"configurations\": [\n        {\n            \"name\": \"Attach to url with files served from ./out\",\n            \"type\": \"chrome\",\n            \"request\": \"attach\",\n            \"port\": 9222,\n            \"url\": \"\u003curl of the open browser tab to connect to\u003e\",\n            \"webRoot\": \"${workspaceFolder}/out\"\n        }\n    ]\n}\n```\n\n### Chrome user profile note (`Cannot connect to the target: connect ECONNREFUSED`)\n\nNormally, if Chrome is already running when you start debugging with a launch config, then the new instance won't start in remote debugging mode. So by default, the extension launches Chrome with a separate user profile in a temp folder. Use the `userDataDir` launch config field to override or disable this. If you are using the `runtimeExecutable` field, this isn't enabled by default, but you can forcibly enable it with `\"userDataDir\": true`.\n\nIf you are using an attach config, make sure you close other running instances of Chrome before launching a new one with `--remote-debugging-port`. Or, use a new profile with the `--user-data-dir` flag yourself.\n\nFor other troubleshooting tips for this error, [see below](#cannot-connect-to-the-target:-connect-ECONNREFUSED-127.0.0.1:9222).\n\n### Errors from chrome-error://chromewebdata\n\nIf you see errors with a location like `chrome-error://chromewebdata/` in the error stack, these errors are not from the extension or from your app - they are usually a sign that Chrome was not able to load your app.\n\nWhen you see these errors, first check whether Chrome was able to load your app. Does Chrome say \"This site can't be reached\" or something similar? You must start your own server to run your app. Double-check that your server is running, and that the url and port are configured correctly.\n\n### Other targets\nYou can also theoretically attach to other targets that support the same Chrome Debugging protocol, such as Electron or Cordova. These aren't officially supported, but should work with basically the same steps. You can use a launch config by setting `\"runtimeExecutable\"` to a program or script to launch, or an attach config to attach to a process that's already running. If Code can't find the target, you can always verify that it is actually available by navigating to `http://localhost:\u003cport\u003e/json` in a browser. If you get a response with a bunch of JSON, and can find your target page in that JSON, then the target should be available to this extension.\n\n### Examples\nSee our wiki page for some configured example apps: [Examples](https://github.com/Microsoft/vscode-chrome-debug/wiki/Examples)\n\n\n### Other optional launch config fields\n* `trace`: When true, the adapter logs its own diagnostic info to a file. The file path will be printed in the Debug Console. This is often useful info to include when filing an issue on GitHub. If you set it to \"verbose\", it will also log to the console.\n* `runtimeExecutable`: Workspace relative or absolute path to the runtime executable to be used. If not specified, Chrome will be used from the default install location.\n* `runtimeArgs`: Optional arguments passed to the runtime executable.\n* `env`: Optional dictionary of environment key/value pairs.\n* `cwd`: Optional working directory for the runtime executable.\n* `userDataDir`: Normally, if Chrome is already running when you start debugging with a launch config, then the new instance won't start in remote debugging mode. So by default, the extension launches Chrome with a separate user profile in a temp folder. Use this option to set a different path to use, or set to false to launch with your default user profile.\n* `url`: On a 'launch' config, it will launch Chrome at this URL.\n* `urlFilter`: On an 'attach' config, or a 'launch' config with no 'url' set, search for a page with this url and attach to it. It can also contain wildcards, for example, `\"localhost:*/app\"` will match either `\"http://localhost:123/app\"` or `\"http://localhost:456/app\"`, but not `\"https://stackoverflow.com\"`.\n* `targetTypes`: On an 'attach' config, or a 'launch' config with no 'url' set, set a list of acceptable target types from the default `[\"page\"]`. For example, if you are attaching to an Electron app, you might want to set this to `[\"page\", \"webview\"]`. A value of `null` disables filtering by target type.\n* `sourceMaps`: By default, the adapter will use sourcemaps and your original sources whenever possible. You can disable this by setting `sourceMaps` to false.\n* `pathMapping`: This property takes a mapping of URL paths to local paths, to give you more flexibility in how URLs are resolved to local files. `\"webRoot\": \"${workspaceFolder}\"` is just shorthand for a pathMapping like `{ \"/\": \"${workspaceFolder}\" }`.\n* `smartStep`: Automatically steps over code that doesn't map to source files. Especially useful for debugging with async/await.\n* `disableNetworkCache`: If false, the network cache will be NOT disabled. It is disabled by default.\n* `showAsyncStacks`: If true, callstacks across async calls (like `setTimeout`, `fetch`, resolved Promises, etc) will be shown.\n* `breakOnLoad`: Experimental. If true, the debug adapter will attempt to set breakpoints in scripts before they are loaded, so it can hit breakpoints at the beginnings of those scripts. Has a perf impact.\n* `breakOnLoadStrategy`: The strategy used for `breakOnLoad`. Options are \"Instrument\" or \"Regex\". Instrument \"[tells] Chrome to pause as each script is loaded, resolving sourcemaps and setting breakpoints\" Regex \"[s]ets breakpoints optimistically in files with the same name as the file in which the breakpoint is set.\"\n\n## Skip files / Blackboxing / Ignore files\nYou can use the `skipFiles` property to ignore/blackbox specific files while debugging. For example, if you set `\"skipFiles\": [\"jquery.js\"]`, then you will skip any file named 'jquery.js' when stepping through your code. You also won't break on exceptions thrown from 'jquery.js'. This works the same as \"blackboxing scripts\" in Chrome DevTools.\n\nThe supported formats are:\n  * The name of a file (like `jquery.js`)\n  * The name of a folder, under which to skip all scripts (like `node_modules`)\n  * A path glob, to skip all scripts that match (like `node_modules/react/*.min.js`)\n\n## Page refreshing\nThis debugger also enables you to refresh your target by simply hitting the restart button in the debugger UI. Additionally you can map the refresh action to your favorite keyboard shortcut by adding the following key mapping to [Key Bindings](https://code.visualstudio.com/docs/getstarted/keybindings):\n\n```json\n{\n    \"key\": \"ctrl+r\",\n    \"command\": \"workbench.action.debug.restart\",\n    \"when\": \"inDebugMode\"\n}\n```\nRead more here https://github.com/Microsoft/vscode-chrome-debug-core/issues/91#issuecomment-265027348\n\n## Sourcemaps\nThe debugger uses sourcemaps to let you debug with your original sources, but sometimes the sourcemaps aren't generated properly and overrides are needed. In the config we support `sourceMapPathOverrides`, a mapping of source paths from the sourcemap, to the locations of these sources on disk. Useful when the sourcemap isn't accurate or can't be fixed in the build process.\n\nThe left hand side of the mapping is a pattern that can contain a wildcard, and will be tested against the `sourceRoot` + `sources` entry in the source map. If it matches, the source file will be resolved to the path on the right hand side, which should be an absolute path to the source file on disk.\n\nA few mappings are applied by default, corresponding to some common default configs for Webpack and Meteor:\n```javascript\n// Note: These are the mappings that are included by default out of the box, with examples of how they could be resolved in different scenarios. These are not mappings that would make sense together in one project.\n// webRoot = /Users/me/project\n\"sourceMapPathOverrides\": {\n    \"webpack:///./~/*\": \"${webRoot}/node_modules/*\",       // Example: \"webpack:///./~/querystring/index.js\" -\u003e \"/Users/me/project/node_modules/querystring/index.js\"\n    \"webpack:///./*\":   \"${webRoot}/*\",                    // Example: \"webpack:///./src/app.js\" -\u003e \"/Users/me/project/src/app.js\",\n    \"webpack:///*\":     \"*\",                               // Example: \"webpack:///project/app.ts\" -\u003e \"/project/app.ts\"\n    \"webpack:///src/*\": \"${webRoot}/*\",                    // Example: \"webpack:///src/app.js\" -\u003e \"/Users/me/project/app.js\"\n    \"meteor://💻app/*\": \"${webRoot}/*\"                    // Example: \"meteor://💻app/main.ts\" -\u003e \"/Users/me/project/main.ts\"\n}\n```\nIf you set `sourceMapPathOverrides` in your launch config, that will override these defaults. `${workspaceFolder}` and `${webRoot}` can be used here. If you aren't sure what the left side should be, you can use the `.scripts` command (details below). You can also use the `trace` option to see the contents of the sourcemap, or look at the paths of the sources in Chrome DevTools, or open your `.js.map` file and check the values manually.\n\n### Ionic/gulp-sourcemaps note\nIonic and gulp-sourcemaps output a sourceRoot of `\"/source/\"` by default. If you can't fix this via your build config, I suggest this setting:\n```json\n\"sourceMapPathOverrides\": {\n    \"/source/*\": \"${workspaceFolder}/*\"\n}\n```\n\n## Usage with remote VS Code extensions\n\nThis extension can be used with the [VS Code Remote Extensions](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) to debug an app in a local Chrome window. Here's an example workflow using the [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) extension:\n\n- Connect to the SSH remote where your project is located\n- Launch the development server on the remote\n- Run the \"Forward Port From Active Host\" command to forward the port the server is listening on. For example, if your development server is listening on port 3000, forward port 3000 to the local machine.\n- Start your \"chrome\" launch config\n- Chrome should start on the local machine, accessing your app via the forwarded port\n- Debugging works as normally\n\nThere are a couple caveats to this workflow:\n- Since the extension can't currently access the remote disk, sourcemaps can't be read from disk. If sourcemaps are inlined, they will still be used. If possible, they will be downloaded through your webserver.\n- In a local window, when resolving your script locations with webRoot/pathMapping, the extension does some searching for the correct script. Again, since the extension can't check the remote disk, the extension can't do this searching, so your webRoot/pathMapping must be exactly accurate to resolve the script location.\n\nIf you have any other issues, please open an issue.\n\n## Troubleshooting\n\n### My breakpoints aren't hit. What's wrong?\n\nIf your breakpoints aren't hit, it's most likely a sourcemapping issue or because you are having breakpoints in immediately executed code. If you for example have a breakpoint in a `render function` that runs on page load, sometimes our debugger might not be attached to Chrome before the code has been executed. This means that you will have to refresh the page in Chrome after we have attached from VS Code to hit your breakpoint.\n\nAlternatively, we have an experimental \"break-on-load\" configuration option which will make this timing issue more transparent. It landed in https://github.com/microsoft/vscode-chrome-debug-core/pull/241.\n\nIf you have a sourcemapping issue, please see https://github.com/Microsoft/vscode-chrome-debug#sourcemaps\n\n### Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:9222\nThis message means that the extension can't attach to Chrome, because Chrome wasn't launched in debug mode. Here are some things to try:\n* If using an `attach` type config, ensure that you launched Chrome using `--remote-debugging-port=9222`. And if there was already a running instance, close it first or see note about `--user-data-dir` above.\n* Ensure that the `port` property matches the port on which Chrome is listening for remote debugging connections. This is `9222` by default. Ensure nothing else is using this port, including your web server. If something else on your computer responds at `http://localhost:9222`, then set a different port.\n* If using a `launch` type config with the `userDataDir` option explicitly disabled, close other running instances of Chrome - if Chrome is already running, the extension may not be able to attach, when using launch mode. Chrome can even stay running in the background when all its windows are closed, which will interfere - check the taskbar or kill the process if necessary.\n* If all else fails, try to navigate to `http://localhost:\u003cport\u003e/json` in a browser when you see this message - if there is no response, then something is wrong upstream of the extension. If there is a page of JSON returned, then ensure that the `port` in the launch config matches the port in that url.\n\n### General things to try if you're having issues:\n* Ensure `webRoot` is set correctly if needed\n* Look at your sourcemap config carefully. A sourcemap has a path to the source files, and this extension uses that path to find the original source files on disk. Check the `sourceRoot` and `sources` properties in your sourcemap and make sure that they can be combined with the `webRoot` property in your launch config to build the correct path to the original source files.\n* This extension ignores sources that are inlined in the sourcemap - you may have a setup that works in Chrome Dev Tools, but not this extension, because the paths are incorrect, but Chrome Dev Tools are reading the inlined source content.\n* Check the console for warnings that this extension prints in some cases when it can't attach.\n* Ensure the code in Chrome matches the code in Code. Chrome may cache an old version.\n* If your breakpoints bind, but aren't hit, try refreshing the page. If you set a breakpoint in code that runs immediately when the page loads, you won't hit that breakpoint until you refresh the page.\n* File a bug in this extension's [GitHub repo](https://github.com/Microsoft/vscode-chrome-debug), including the debug adapter log file. Create the log file by setting the \"trace\" field in your launch config and reproducing the issue. It will print the path to the log file at the top of the Debug Console. You can drag this file into an issue comment to upload it to GitHub.\n* If you're using Webpack, we recommend using the `\"devtool\": \"source-map\"` option (in your `webpack.config.js` file) as the others produce lower-fidelity sourcemaps and you may have issues setting breakpoints. See the [full list of devtool options for webpack](https://webpack.js.org/configuration/devtool/) for more information.\n\n### The `.scripts` command\nThis feature is extremely useful for understanding how the extension maps files in your workspace to files running in Chrome. You can enter `.scripts` in the Debug Console to see a listing of all scripts loaded in the runtime, their sourcemap information, and how they are mapped to files on disk. The format is like this:\n\n```\n› \u003cThe exact URL for a script, reported by Chrome\u003e (\u003cThe local path that has been inferred for this script, using webRoot, if applicable\u003e)\n    - \u003cThe exact source path from the sourcemap\u003e (\u003cThe local path inferred for the source, using sourceMapPathOverrides, or webRoot, etc, if applicable\u003e)\n```\n\nExample:\n```\n.scripts\n› eval://43\n› http://localhost:8080/index.html (/Users/me/project/wwwroot/index.html)\n› http://localhost:8080/out/test1.js (/Users/me/project/wwwroot/out/test1.js)\n    - /src/test1a.ts (/Users/me/project/wwwroot/src/test1a.ts)\n    - /src/test1b.ts (/Users/me/project/wwwroot/src/test1b.ts)\n    - /src/test1c.ts (/Users/me/project/wwwroot/src/test1c.ts)\n› http://localhost:8080/out/test2.js (/Users/me/project/wwwroot/out/test2.js)\n    - /src/test2.ts (/Users/me/project/wwwroot/src/test2.ts)\n```\n\nIf the paths of your source files show as not being resolved correctly here, you may have to change `sourceMapPathOverrides` or `webRoot` to help the debugger resolve them to real paths on disk.\n\nIf you are wondering what a script is, for example, that 'eval' script, you can also use `.scripts` to get its contents: `.scripts eval://43`.\n\n---\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","funding_links":[],"categories":["TypeScript","chrome"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fvscode-chrome-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fvscode-chrome-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fvscode-chrome-debug/lists"}