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

chore: Add launch.json for debugging tests #9599

Merged
merged 4 commits into from
Feb 2, 2023

Conversation

Lightning00Blade
Copy link
Collaborator

@Lightning00Blade Lightning00Blade commented Jan 27, 2023

This makes running or debugging test easier for VSCode user.
Have to check DevContainer behavior, but should make contributing from there easier as well.

TODO: Add documentation.

@jrandolf-2
Copy link
Contributor

jrandolf-2 commented Jan 27, 2023

Adding launch.json is generally not done because debugging is very use-case specific. This particular JSON doesn't really take advantage of breakpoint debugging too. It's just running the tests from what I see. What may make sense is a launch.tmpl.json that contains an example configuration and also implement debugging as featured in pptr.dev. This would help developers of Puppeteer, but also model current recommendations.

@Lightning00Blade
Copy link
Collaborator Author

Lightning00Blade commented Jan 27, 2023

VsCode attaches a debugger to node (and all spawned processes) when running from launch.json so breakpoints put in puppeteer or test do stop. Implementing the thing in the debugging page is for users of puppeteer, not contributes like this PR is aimed for.

@Lightning00Blade Lightning00Blade force-pushed the add-vscode-launch-for-tests branch from d62dd0c to efb62b4 Compare January 30, 2023 13:18
@jrandolf-2 jrandolf-2 force-pushed the add-vscode-launch-for-tests branch from eacb17f to dc2db70 Compare February 1, 2023 09:26
@Lightning00Blade Lightning00Blade force-pushed the add-vscode-launch-for-tests branch from dc2db70 to d84e093 Compare February 1, 2023 09:48
@jrandolf-2 jrandolf-2 force-pushed the add-vscode-launch-for-tests branch from d84e093 to 7f1d7a9 Compare February 1, 2023 20:54
@Lightning00Blade Lightning00Blade merged commit 25154c1 into main Feb 2, 2023
@Lightning00Blade Lightning00Blade deleted the add-vscode-launch-for-tests branch February 2, 2023 08:01
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.

3 participants