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: Inspect CDP messages with DEBUG env #65

Merged
merged 4 commits into from
May 23, 2024

Conversation

marvinhagemeister
Copy link
Contributor

@marvinhagemeister marvinhagemeister commented May 23, 2024

Add a DEBUG env variable that dumps websocket messages to the console to make it easier to debug what's going on. By default it's off.

Launching: /Users/marvinh/Library/Caches/astral/121.0.6130.0/chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing --remote-debugging-port=0 --no-first-run --password-store=basic --use-mock-keychain --user-data-dir=/var/folders/p4/1fpgh8gs5853pjcrl_jl4v300000gn/T/508176846bf68017 --headless=new --hide-scrollbars
--> {"id":1,"method":"Target.createTarget","params":{"url":""}}
<-- {"id":1,"result":{"targetId":"8B7092211B427E4067347EB839231A2B"}}
--> {"id":2,"method":"Target.createTarget","params":{"url":""}}
<-- {"id":2,"result":{"targetId":"241AE5ED769EEFD63CC52B8B1215E98A"}}
--> {"id":3,"method":"Browser.close"}
<-- {"id":3,"result":{}}
--> {"id":1,"method":"Browser.close"}
<-- {"id":1,"result":{}}

@marvinhagemeister marvinhagemeister marked this pull request as draft May 23, 2024 09:06
@marvinhagemeister
Copy link
Contributor Author

On second thought, this should probably be done in celestial

@marvinhagemeister marvinhagemeister marked this pull request as ready for review May 23, 2024 09:11
Copy link
Owner

@lino-levan lino-levan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was manually adding and removing this code a bunch while building this, great to have behind a flag.

@lino-levan lino-levan merged commit 3cf9fa3 into lino-levan:main May 23, 2024
2 of 3 checks passed
@marvinhagemeister marvinhagemeister deleted the cdp-debug branch May 23, 2024 17:29
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.

2 participants