[Bug]: When starting from VSCode extension, 'devtools: true' in launchOptions does nothing
Version
1.42.1
Steps to reproduce
- clone https://github.com/karyon/playwright-examples
- git checkout repro-devtools-doing-nothing
- npm install, npx playwright install
- Using the VSCode extension, run any test with "show browser" enabled
Expected behavior
Browser opens and has devtools open
Actual behavior
Browser opens but does not have devtools open
Additional context
browserType.launch() docs
launchOptions docs say any browserType.launch() option (docs) can be used
In https://github.com/microsoft/playwright/issues/28529#issuecomment-1845009195 someone is reporting this is working for them
In playwright.config.ts, uncomment args: ['--auto-open-devtools-for-tabs'], this does work.
Environment
System:
OS: Windows 10 10.0.19045
CPU: (12) x64 Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
Memory: 6.92 GB / 31.76 GB
Binaries:
Node: 18.17.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.21 - C:\Program Files\nodejs\yarn.CMD
npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.15.4 - C:\Program Files\nodejs\pnpm.CMD
IDEs:
VSCode: 1.85.2 - C:\Program Files\Microsoft VS Code\bin\code.CMD
Languages:
Bash: 5.2.26 - C:\Program Files\Git\usr\bin\bash.EXE
npmPackages:
@playwright/test: ^1.42.1 => 1.42.1
Investigation: The devtools: true option does not get taken into account when using the VSCode extension.
When running the tests via the CLI, it works: npx playwright test --project=chromium --headed api-mocking:5.
Ah I forgot! When using chromium.launch in test code, it works too.
I agree with @odinho in #30025, the VSCode debugging doesn't seem like an adequate replacement for the chrome devtools at the moment. I used this to debug code in page.evaluate, whereas putting breakpoints in VSCode in a page.evaluate doesn't seem to do anything. I'll have to continue using args: ['--auto-open-devtools-for-tabs'] which seems like a poor workaround.