Skip to content
This repository was archived by the owner on Sep 17, 2021. It is now read-only.

Commit 7b65b4d

Browse files
authored
Merge branch 'master' into addLaunchOnDebugSessionStart
2 parents b82b49b + 90fc046 commit 7b65b4d

File tree

4 files changed

+27
-13
lines changed

4 files changed

+27
-13
lines changed

README.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,43 @@ A VSCode extension to host the chrome devtools inside of a webview.
88
</a>
99
</p>
1010

11-
![Demo](demo.gif)
11+
## Attach to a running chrome instance:
12+
![Demo1](demo.gif)
13+
14+
## Launch a chrome debugger project and use screencasting:
15+
![Demo2](demo2.gif)
1216

1317
# Using the extension
14-
- Start chrome with remote-debugging enabled on port 9222
15-
- `chrome.exe --remote-debugging-port=9222`
16-
- Open the devtools inside VS Code
17-
- Either
18-
- Run the `DevTools for Chrome: Attach to a target` command to attch to an instance of Chrome that's running
19-
- Run the `DevTools for Chrome: Launch` command to launch Chrome and attach to it (you can navigate to whatever page you want)
18+
## Launching Chrome manually
19+
- Start chrome with no extensions and remote-debugging enabled on port 9222:
20+
- `chrome.exe --disable-extensions --remote-debugging-port=9222`
21+
- Open the devtools inside VS Code:
22+
- Run the command - `DevTools for Chrome: Attach to a target`
23+
- Select a target from the drop down
24+
25+
## Launching Chrome via the extension
26+
- Start chrome:
27+
- Run the command - `DevTools for Chrome: Launch Chrome and then attach to a target`
28+
- Navigate to whatever page you want
29+
- Open the devtools inside VS Code:
2030
- Select a target from the drop down
2131

2232

2333
# Known Issues
2434
- Prototyping stage
25-
- Settings are not persisted
35+
- Settings in the devtools are not persisted
36+
- Chrome browser extensions can sometimes cause the webview to terminate
2637

2738
# Developing the extension itself
2839

2940
- Start chrome with remote-debugging enabled on port 9222
30-
- `chrome.exe --remote-debugging-port=9222`
41+
- `chrome.exe --disable-extensions --remote-debugging-port=9222`
3142
- Run the extension
3243
- `npm install`
3344
- `npm run watch` or `npm run build`
3445
- Open the folder in VSCode
3546
- `F5` to start debugging
3647
- Open the devtools
37-
- Run the `DevTools: Attach to a target` command
48+
- Run the command - `DevTools for Chrome: Attach to a target`
3849
- Select a target from the drop down
3950

demo2.gif

2.45 MB
Loading

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@
4343
"commands": [
4444
{
4545
"command": "devtools-for-chrome.launch",
46-
"title": "Launch Chrome and the Chrome DevTools (in VS Code)",
46+
"title": "Launch Chrome and then attach to a target",
4747
"category": "DevTools for Chrome"
4848
},
4949
{
5050
"command": "devtools-for-chrome.attach",
51-
"title": "Attach the Chrome DevTools (in VS Code) to a target",
51+
"title": "Attach to a target",
5252
"category": "DevTools for Chrome"
5353
}
5454
],

src/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ export function existsSync(path: string): boolean {
6969
}
7070

7171
export function launchLocalChrome(chromePath: string, chromePort: number, targetUrl: string) {
72-
const chromeArgs = [`--remote-debugging-port=${chromePort}`];
72+
const chromeArgs = [
73+
'--disable-extensions',
74+
`--remote-debugging-port=${chromePort}`
75+
];
7376

7477
const chromeProc = cp.spawn(chromePath, chromeArgs, {
7578
stdio: 'ignore',

0 commit comments

Comments
 (0)