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

[Feature] Expose a /json/list endpoint when calling launchServer compatible with the one Chromium publishes #7485

Closed
connor4312 opened this issue Jul 6, 2021 · 2 comments
Assignees

Comments

@connor4312
Copy link
Member

For VS Code, we are building a way to run unit tests in "serverless"/web mode on browsers. To enable debugging in this scenario, we need to either have playwright attach to the browser the js-debug launches (which I hacked together but sometimes fails and is not recommended) or have js-debug attach to playwright's browser.

Playwright has a launchServer option already. If the launched server exposed a /json/list endpoint roughly compatible with the one Chromium publishes, we'd be able to attach to it. Or, if there was some other way to ask the browser to set up a --remote-debugging-port on a specific port number.

For additional discussion and context, see https://github.com/microsoft/vscode-internalbacklog/issues/2235#issuecomment-875017195

@JoelEinbinder
Copy link
Contributor

I think you linked to an internal issue that I don't have access to :)

You can pass --remote-debugging-port=9222 in the args option of browserType.launchServer. Is there a reason this doesn't work for you?

@connor4312
Copy link
Member Author

That works beautifully. I assumed this wouldn't work, but should have checked 🤦 thanks!

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

No branches or pull requests

3 participants