Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(debug): chromium debugging port #2246

Merged
merged 1 commit into from Jun 4, 2020
Merged

feat(debug): chromium debugging port #2246

merged 1 commit into from Jun 4, 2020

Conversation

dgozman
Copy link
Contributor

@dgozman dgozman commented May 14, 2020

This exposes Chromium remote debugging pipe under the port PLAYWRIGHT_CHROMIUM_DEBUG_PORT.

@nojvek
Copy link

nojvek commented May 17, 2020

Was looking exactly for this. Your comments say breakpoints won’t work but debugger statements will. Why is that? Is pwa-chrome debugger that different from the current chrome debugger?

Also how does one attach to Firefox and WebKit. I see your PR only has support for chromium.

@dgozman
Copy link
Contributor Author

dgozman commented May 18, 2020

Hah, I did not expect comments so fast 😄

Was looking exactly for this.

Could you please tell me more about your scenario? When testing locally, I was not satisfied with just debugging and wanted to open developer tools for dom/css inspection, e.g. to pick a selector. Are you already debugging the page in VSCode, and just want to debug it together with the test?

Your comments say breakpoints won’t work but debugger statements will. Why is that? Is pwa-chrome debugger that different from the current chrome debugger?

That's only for our own Playwright tests. I probably misconfigured the exclude paths so that debugger is scanning our very large checkout that includes browser source trees.

Also how does one attach to Firefox and WebKit. I see your PR only has support for chromium.

Well, VSCode has different debuggers for different browsers, so wiring them up would also be different.

@nojvek
Copy link

nojvek commented May 19, 2020

So I’m working on a little framework that lets us run mocha tests in nodejs or any of playwright supported browsers.

One of my stories is debugging should be as easy as giving an env flag INSPECT=1 and having vscode give the debugging experience in a consistent fashion across different environments. Nodejs is easy with —inspect flag which opens up a port.

Using chromium with debugger port is nice since it allows many clients to connect. (Your PR) So vscode, playwright websocket and even chrome can remote inspect at same time.

I read through a lot of playwright code and figured that chromium right now doesn’t open up a port but simply communicates via a pipe. The port option is also nice if playwright is hosted on the cloud and user can remote debug.

So yeah, really looking forward to this.

@dgozman dgozman changed the title wip: feat(debug): experimental debug port support feat(debug): chromium debugging port under PLAYWRIGHT_CHROMIUM_DEBUG_PORT Jun 4, 2020
@dgozman dgozman changed the title feat(debug): chromium debugging port under PLAYWRIGHT_CHROMIUM_DEBUG_PORT feat(debug): chromium debugging port Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants