Skip to content

[Feature]: Provide error stack-traces evaluating source-maps #33398

@MiladSadinam

Description

@MiladSadinam

🚀 Feature Request

Playwright documentation (https://playwright.dev/docs/api/class-consolemessage) recommends the following code to retrieve console errors:

page.on('console', msg => {
  if (msg.type() === 'error')
    console.log(`Error text: "${msg.text()}"`);
})

We use this to create a simple trace for failed tests on our CI system. Our CI system uses minefield builds but with generated source maps. Still, msg.text() ignores any source maps, making the stack trace useless. It would be very helpful if Playwright provided stack traces that already took source maps into account.

Example

No response

Motivation

Provide meaningful stack traces in CI systems that use minified builds because of performance considerations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions