playwright-vscode icon indicating copy to clipboard operation
playwright-vscode copied to clipboard

When using route mocking and running as debug, my app isn't interactable

Open baptisteArno opened this issue 3 years ago • 0 comments

When I'm setting up a route mocking:

page.route('/api/auth/session', (route) => {
    if (route.request().method() === 'GET') {
      return route.fulfill({
        status: 200,
        body: '{"user":{"id":"userId","name":"John Doe","email":"[email protected]","emailVerified":null,"image":"https://avatars.githubusercontent.com/u/16015833?v=4","stripeId":null,"graphNavigation": "TRACKPAD"}}',
      })
    }
    return route.continue()
  })

And running a test in debug mode and stopping at a break point, then my application isn't interactable. By that, I mean that it won't make any HTTP request if I click around my application.

So it completely kills my TDD workflow where I'm used to manually try things on the debug browser.

When running from CLI with PWDEBUG=1 it works totally fine.

How can I check what Playwright VSCode is running as CLI command under the hood?

baptisteArno avatar Aug 25 '22 06:08 baptisteArno