Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

First work out whether the test is paused or the debug session is merely still open. A breakpoint or page.pause() is supposed to stop execution; use Continue/Resume or remove the pause point. If the test has finished but a launched Node.js debug session will not close, press VS Code’s Stop button a second time to force termination. If you attached to a process, Stop disconnects the debugger but leaves that process running.

Those symptoms look similar but need different fixes. The steps below help you identify which one you have before you stop a process or change your Playwright configuration.

Identify what “stuck” means in this run

Look at VS Code’s Debug view before changing settings. Check the current execution line, the call stack, and whether the browser is still open. A test stopped at a line of test code is different from a test that has ended while its debug session remains active.

  • Execution is stopped at a test line: check for a breakpoint or an explicit pause. The Playwright extension’s Debug Test workflow can pause at a breakpoint by design.
  • The Inspector is waiting for you: look for page.pause() in the test or in code it calls. That call deliberately pauses execution during debugging.
  • The test appears finished, but VS Code still shows an active session: investigate how the session started—launch or attach—before using Stop.
  • The test is still doing work: inspect the current line and call stack, and use Playwright’s own debugging tools to determine whether it is progressing or waiting at a particular action.

A pause by itself is not proof of a hang. The title alone does not establish a single root cause: the operating system, VS Code and Playwright versions, configuration, and exact symptom can all matter.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Resume a test paused at a breakpoint or page.pause()

Check the current line and breakpoints

  1. Open VS Code’s Run and Debug view and inspect the highlighted line and call stack.
  2. If execution is at a line with a breakpoint, select Continue or Resume to let the test proceed. Use the step controls only if you intend to inspect the next action or line.
  3. If the test pauses at the same breakpoint again, decide whether you still need it. Remove or disable it if you want an uninterrupted run.

The Playwright extension’s Debug Test command is designed to let you inspect a test interactively. A breakpoint reached during that workflow is expected debugger behavior, not a Playwright failure.

Find and remove an explicit pause

Search the failing test and the helper code it invokes for page.pause(). When execution reaches it, Playwright pauses so you can inspect the page in the Playwright Inspector. Resume from the Inspector when you want to continue that run. Remove the call when you no longer need the inspection point; otherwise later debug runs will stop there again.

Do not remove every breakpoint or pause call as a first response if you are using one to investigate a failure. Resume once to confirm that execution can continue, then remove only the pause trigger that is no longer useful.

End a session without stopping the wrong process

Use VS Code’s Stop action when the debug session should end. The effect depends on whether VS Code launched the Node.js process or attached to one that was already running.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a launched test process

VS Code’s Node.js debugging guidance says to press Stop again to force termination if a launched debuggee does not shut down after the first Stop. Try the normal Stop action first; use the second press only if that launched process remains active.

For an attached process

In an attach session, Stop disconnects the debugger; it does not end the target process. That process can keep running after VS Code is no longer attached. If you need the process itself to exit, use the process’s normal shutdown mechanism or the terminal or task that started it. Do not assume that disconnecting an attached debugger killed the test runner.

If you are unsure which kind of session you started, inspect the active debug configuration before taking further action. Avoid killing processes blindly: it can interrupt unrelated work and obscure whether the original test completed.

Check a custom VS Code debug configuration

If the session repeatedly starts the wrong target, fails to end, or behaves differently from the Playwright extension’s normal Debug Test command, inspect .vscode/launch.json and any task it invokes. VS Code notes that supported settings vary by debugger, so do not copy a configuration written for a different runtime or request type.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • type: confirm that the configuration uses the debugger appropriate for the process you intend to debug.
  • request: determine whether it is a launch or attach session. This distinction changes what Stop does.
  • Entry point, arguments, and working directory: check that VS Code starts the intended test command from the project location you expect.
  • Environment: confirm that required variables are available to the debugged process.
  • Pre-launch task: check whether a task starts or keeps a process alive independently of the debugger.
  • Attach connection details: make sure the target process is running and the configuration’s connection settings match it.

Change one relevant setting at a time, then start a fresh debug session. That makes it easier to tell whether the configuration change affected the symptom. If the default Playwright extension workflow works but a custom configuration does not, focus on the custom configuration rather than assuming the test itself is stuck.

Reproduce the test outside the VS Code test-debug workflow

Isolating the test can show whether the problem is in the test run or in the particular VS Code session. From the project directory, run the relevant test with Playwright Inspector:

npx playwright test example.spec.ts:10 --debug

Replace example.spec.ts:10 with the file and line for the failing test. The Inspector is useful for stepping through actions, inspecting locators, and viewing actionability logs. If the command also pauses at the same point, inspect the test’s breakpoints, explicit pause calls, and current action. If it behaves as expected while the VS Code session does not, compare the two launch paths and their configuration.

For a broader interactive view, start UI Mode:

npx playwright test --ui

UI Mode lets you select tests and inspect logs, errors, network requests, DOM snapshots, and traces. It is useful when you need to narrow down which test or action behaves differently, or when you want to inspect the run without relying on the current VS Code debug session.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use a trace to inspect a run after it finishes

If the test has already failed or completed, a trace can provide a retrospective view rather than requiring you to keep the VS Code session open. Playwright’s trace tools can show a timeline and recorded artifacts such as DOM snapshots and network activity. Use those details to distinguish a slow or failing test action from a debugger session that remains open after the test has ended.

A trace is useful only when one is available for the run. It is not a way to resume execution from a paused breakpoint. For a live pause, use the debugger or Inspector; for a completed run, use the recorded trace to examine what happened.

Open browser DevTools from the documented Playwright workflow

If your goal is to inspect the browser rather than the VS Code process, use the Playwright extension’s documented browser workflow: choose Run Test with Show Browser enabled to reuse the browser session and open Chrome DevTools. This is distinct from stopping a test that is paused in the debugger; browser DevTools help inspect the page, while VS Code’s debugger controls test execution.

Quick troubleshooting by symptom

What you see What to check What to do
Highlighted test line and a paused debugger Breakpoint at that line Continue or Resume; disable the breakpoint if it is no longer needed.
Inspector waiting at a particular call page.pause() in the test or a helper Resume in Inspector or remove the explicit pause call.
Test ended but a launched session remains active Whether the Node.js process was launched by VS Code Press Stop again to force termination if the first Stop did not shut down the launched debuggee.
Debugger disconnected but a process still runs Whether the session used attach Stop the target through the terminal, task, or process that started it; attach-session Stop only disconnects the debugger.
Wrong test or process starts repeatedly .vscode/launch.json, arguments, working directory, environment, and pre-launch task Correct the relevant setting and retry with a fresh session.
Unclear whether the test or editor workflow is at fault Same test via Inspector or UI Mode Compare behavior outside the extension workflow, then inspect the VS Code launch path if results differ.

Or skip the browser setup

If you need a screenshot of a web page while investigating a visual issue, ScreenshotNeo can capture a URL through one GET request; it does not resume a paused Playwright test or diagnose a VS Code debug session. For example, this saves a WebP screenshot of Stripe:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

The Free plan includes 1,000 screenshots a month with no card required; paid plans start at $5 for 3,000 screenshots. Every feature is available on every plan. Learn more at ScreenshotNeo, or sign up free for 1,000 screenshots a month with no card.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.