Skip to content

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented May 2, 2024

This enables using the vscode debugger in playwright tests.

Extension is: https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright

This enables using the vscode debugger in playwright tests
Comment on lines +136 to +143
const logLines = (chunk: string | Buffer): string[] => {
if (chunk instanceof Buffer) {
// When running in a debugger, the input to this is a Buffer instead of a string.
// Unsure why, but this prevents the `trimEnd` from throwing an error.
return [chunk.toString()];
}
return chunk.trimEnd().split("\n");
};
Copy link
Member Author

Choose a reason for hiding this comment

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

Debugger fails without this

Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

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

Sick

@Emyrk Emyrk enabled auto-merge (squash) May 2, 2024 22:53
@Emyrk Emyrk merged commit 7779c0a into main May 2, 2024
@Emyrk Emyrk deleted the stevenmasley/playwright_debug branch May 2, 2024 23:14
@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants