Debugging and Trace Viewer Interview Questions for Playwright Testing
34 Debugging and Trace Viewer questions with answers for playwright testing roles — 10 easy, 18 medium, 6 hard.
About Debugging and Trace Viewer
Covers the Inspector, UI mode, page.pause, the VS Code extension, trace recording and the trace viewer, HTML reports, console logs and techniques to reproduce flaky failures. Almost every interview includes a 'test fails only in CI' scenario, so explaining a clear, evidence-based debugging process is one of the most valuable skills here.
What does page.pause() do?
Show answer
How do you open a trace file?
Show answer
What do headed mode and slowMo do?
Show answer
What is the HTML report and how do you open it?
Show answer
What does the Pick locator tool do?
Show answer
What does npx playwright test --last-failed do?
Show answer
Tell me about a hard bug you found while debugging a test.
Show answer
Tell me about the first time you used the trace viewer to solve a failure.
Show answer
How can you view a trace file without a local Playwright install?
Show answer
How does Playwright's trace viewer help?
Show answer
What is codegen?
Show answer
How do you debug a Playwright test?
Show answer
How do you take screenshots and videos?
Show answer
What are the options for the trace setting in playwright.config?
Show answer
What does a Playwright trace contain?
Show answer
What is UI mode and how is it different from --debug?
Show answer
How do you record a trace manually with the tracing API?
Show answer
How do you capture browser console messages and page errors?
Show answer
How do you fail a test if the page logs any console error?
Show answer
What does the DEBUG=pw:api environment variable do?
Show answer
How do you read a Playwright timeout error message?
Show answer
A trace shows the click landed on an overlay instead of the button. How do you fix it?
Show answer
How do you debug a test in VS Code with the Playwright extension?
Show answer
How do test.slow() and longer timeouts help or hurt debugging?
Show answer
How do you reproduce a flaky test locally?
Show answer
How do you inspect a specific network request in the trace viewer?
Show answer
A test fails with 'Target page, context or browser has been closed'. What usually causes it?
Show answer
A test passes locally but fails in CI with a timeout on a click. How do you use the trace?
Show answer
The suite has a 3 percent flaky rate. How do you find and fix the causes systematically?
Show answer
What are the trade-offs of trace 'on' versus 'retain-on-failure' in CI?
Show answer
A test fails only in WebKit. How do you investigate?
Show answer
Tests pass with one worker but fail with eight. How do you debug this?
Show answer
Describe how you handled a flaky test that was blocking releases.
Show answer
Frequently asked questions
How important is Debugging and Trace Viewer in Playwright Testing interviews?
Covers the Inspector, UI mode, page.pause, the VS Code extension, trace recording and the trace viewer, HTML reports, console logs and techniques to reproduce flaky failures. Almost every interview includes a 'test fails only in CI' scenario, so explaining a clear, evidence-based debugging process is one of the most valuable skills here.
How should I use the Debugging and Trace Viewer sheet?
Go top to bottom — easy to hard. Answer before opening each answer, tick what you solved and save misses to Last-Minute Revision.