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

Testing a website in Visual Studio Code means combining several workflows rather than pressing one universal “test” button. Open the running site to inspect its rendered output, use the Edge or Chrome debugger to diagnose client-side JavaScript, run framework-specific automated tests from the Testing view, and verify complete user journeys against explicit acceptance criteria. The sections below show when to use each approach, how to configure it, and how to troubleshoot failures.

Choose the kind of test you need

Start by naming the question you want answered. These activities overlap, but they do not replace one another.

Question Best VS Code workflow Evidence you get
Does the page look and behave correctly right now? Integrated browser or an external browser Rendered elements, visible layout, interaction results and console messages
Why does browser code fail? Edge or Chrome debugging Breakpoints, call stack, variables, network-related errors and source locations
Will a regression be caught next time? Framework test extension and Testing view Repeatable test results, failures and coverage where the extension supports it
Can a user complete a task? Acceptance-criteria checklist exercised in a browser Observable outcomes such as validation, navigation and successful submission

VS Code does not include one website-testing framework. The language, framework and extension in your project determine which automated tests can be discovered and run.

Prepare the project and define acceptance criteria

Start the development server

Use the command documented by your project, such as its package-script, framework command or task. VS Code does not automatically start every framework’s server. Note the exact local address and port, for example http://localhost:3000, and keep the server terminal visible so startup and runtime errors are not missed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Write observable checks

Turn a vague requirement into a result someone can see or measure:

  • Submitting an empty form displays an error beside the required field.
  • Valid data produces a success message and sends the user to the expected route.
  • A navigation control opens the correct page and preserves the intended query or state.
  • A loading indicator disappears when the requested content is rendered.

These criteria make manual checks reproducible and provide a blueprint for later automated tests. Do not call a check passed until you have actually performed it.

Preview and inspect a website in VS Code

Open the running application

  1. Start the development server with the project’s documented command.
  2. Open the VS Code integrated browser and enter the local URL, or open that URL in Edge, Chrome or another external browser.
  3. For a static page, open the local HTML file directly in the integrated browser.
  4. Exercise the page using the acceptance criteria: click controls, enter representative valid and invalid values, and follow links.

The integrated browser is useful for a quick feedback loop. Its developer tools let you inspect elements and review console output. An external browser is equally valid when you need its extensions, device emulation or a workflow not available in the integrated view.

Inspect the rendered result

  • Use the element inspector to verify the DOM, text, attributes and applied styles.
  • Check the console for uncaught exceptions, failed resource requests and framework warnings.
  • Confirm that the URL, route and query string are the ones your test expects.
  • Resize the viewport and check key breakpoints if responsive behavior is part of the requirement.
  • Record the exact input, browser state and expected result when reporting a defect.

A source file can be correct while the rendered page is wrong because of runtime data, CSS precedence, a failed request or a stale build. Always inspect the page the user actually sees.

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

Debug client-side JavaScript with Edge or Chrome

Use a launch configuration

VS Code’s built-in JavaScript debugger supports browser debugging in Microsoft Edge and Google Chrome, as well as JavaScript, TypeScript and Node.js debugging. A launch configuration connects the debugger to the URL served by your project. Create .vscode/launch.json and select the appropriate browser debug type offered by your installation. A minimal Chrome-style configuration is:

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "chrome",
      "request": "launch",
      "name": "Launch local site",
      "url": "http://localhost:3000",
      "webRoot": "${workspaceFolder}"
    }
  ]
}

Use the Edge debug type when Edge is your target browser. If your framework emits source maps, set the configuration’s source-root or related mapping settings as needed so breakpoints bind to your authored TypeScript or JavaScript instead of generated bundles.

Break, inspect and step

  1. Open the source file containing the suspected handler or rendering code.
  2. Click the gutter to set a breakpoint, then start the “Launch local site” configuration from Run and Debug.
  3. Reproduce the action in the browser. When execution pauses, inspect local variables, the call stack and expressions.
  4. Step over or into calls until the value diverges from your expectation.
  5. Fix the code, reload or restart the session, and repeat the same interaction.

Separate a source failure from a preview failure. First verify that the configured URL is reachable and that the browser console is not reporting an earlier exception. If the debugger reports an inaccessible source map, it may be unable to map generated code back to your source; inspect the map path and server configuration. Focus behavior can also differ while a debugging session owns the page, so reproduce focus-sensitive bugs in the same browser conditions your users have.

Integrated-browser debugging

VS Code documents an editor-browser target for its integrated browser. It requires a manually written debug configuration and is not supplied by Run and Debug auto-detection. If that target is unavailable or inconvenient, launch or attach to Edge or Chrome instead.

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

Run automated tests from the Testing view

Install the extension that matches your framework

Choose an extension that supports the test framework already used by the repository. Official examples across languages include Jest, Mocha, Pytest and JUnit; they are examples, not a requirement that every web project adopt one of them. Read the extension’s discovery and configuration requirements, then install it in the current VS Code environment.

Discover, run and debug tests

  1. Select the beaker icon to open the Testing view.
  2. Allow the extension to discover tests, or run its configured discovery command.
  3. Run the entire suite, a file, a test group or an individual test from the inline controls or Testing view.
  4. Select a failed test to open its output and the Test Results panel.
  5. Use the test’s debug action to run it with breakpoints when the extension supports debugging.

Coverage indicators appear only when the testing extension provides coverage integration. A green editor marker or passing result describes the test run performed by that extension; it does not prove that every browser interaction or backend dependency was covered.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Tasks versus the Testing view

A VS Code task can run the project’s test command and may be detected from package metadata. Tasks are useful for a repeatable command in CI or local development, but running a task alone does not populate the Testing view. The extension must publish test discovery and results for that integration.

Validate a complete user journey

Unit tests can prove a function’s output, and integration tests can prove components work together. A user-flow check asks a different question: can a person accomplish the goal in a real browser?

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Start from a clean or explicitly documented state, including authentication and seed data.
  2. Follow the acceptance criteria in order, using realistic keyboard and pointer actions.
  3. After each important action, inspect the visible result, URL, page content and console.
  4. Capture the exact step, input and expected-versus-actual result for any failure.
  5. Repeat after a fix and preserve the scenario as an automated test when it is valuable and stable.

Browser tools can provide inspected page content, screenshots and console errors as evidence. A screenshot is useful for visual comparison, but it cannot by itself prove that a form submitted correctly or that an API write succeeded.

Common failures and practical fixes

Symptom Likely cause Fix
Browser shows “cannot connect” The server is stopped, the port is wrong or the app bound to another host. Read the server terminal, use its exact URL and update launch.json.
Page loads but controls do nothing A runtime exception, missing event handler or failed request. Check the browser console and network errors, then set a breakpoint in the handler.
Breakpoint is hollow or never pauses The debugger is attached to a different URL, or source maps do not map generated code. Confirm the launch URL, webRoot, build output and source-map paths.
Source-map error in Debug Console The map is missing or inaccessible from the running server. Serve the map at the referenced path or adjust build and mapping settings; debug generated code temporarily if necessary.
No tests appear in Testing No compatible extension is installed, discovery is disabled or the project configuration is invalid. Install the matching extension, inspect its output channel and fix the framework configuration.
Task passes but Testing view is empty A task ran a command without publishing test results. Use the framework extension for discovery and result reporting.
Integrated browser behaves differently Browser-specific APIs, extensions, cookies or focus behavior differ. Reproduce in the target Edge or Chrome version and document the environment.

Desktop VS Code versus VS Code for the Web

Desktop VS Code provides the terminal and browser-debugging workflow described above. VS Code for the Web runs in a browser and has important limits: it lacks the desktop terminal and debugger, and only some extensions run in the browser. You may still edit files and use extensions that are compatible with the web environment, but plan to run the development server and full debugging workflow in desktop VS Code or another local environment when those capabilities are required.

Performance, repeatability and evidence

Keep feedback fast

  • Use a focused test or test file while diagnosing a defect, then run the full suite before merging.
  • Reuse the project’s development server instead of restarting it for every manual check.
  • Keep test data deterministic and isolate network-dependent tests with the framework’s supported mocks.
  • Record browser, viewport, URL, authentication state and relevant environment variables for failures.

Make checks trustworthy

Manual inspection is flexible but depends on careful repetition. Automated tests are repeatable but only cover what they assert. Combine both: use the browser to discover the real acceptance criteria, debugger sessions to locate client-side faults, and a framework extension to preserve regression checks. Treat screenshots, console output and test reports as evidence tied to a specific run, not as proof that every environment will behave identically.

Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is a clean screenshot for visual review, documentation or an automated pipeline, ScreenshotNeo returns an image or PDF from one request. Before capture it accepts cookie or consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets; each step can be disabled. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and response headers identify the page verdict and billing status.

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

cURL

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

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "http://localhost:3000"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'http://localhost:3000' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

See the ScreenshotNeo documentation for request options. It also offers an MCP server with take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients. Options include full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets or custom viewports, retina scale, PDF paper and page controls, custom CSS and JavaScript, clicks before capture, selector or network-idle waits, ad and tracker blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed image links, asynchronous webhooks, bulk capture of 100 URLs per call, a usage API and an OpenAPI specification.

Plan Allowance and price
Free 1,000 shots/month, no card
Starter $5 for 3,000 shots
Growth $15 for 15,000 shots
Pro $39 for 60,000 shots
Scale $99 for 250,000 shots
Business $249 for 1,000,000 shots

Yearly billing provides two months free, and every feature is included on every plan. Create a free ScreenshotNeo account to get 1,000 screenshots a month without a card.

FAQ

Can VS Code test HTML without a framework?

Yes. Open the local HTML file in the integrated browser or an external browser and inspect the rendered page, interactions and console. Automated assertions still require a testing tool appropriate to the project.

Does the Testing view run end-to-end browser tests automatically?

Only when an installed extension supports that framework and publishes its discovery and results. The Testing view itself is an interface, not a universal test runner.

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

Should I debug in the integrated browser or Chrome?

Use either supported workflow. Choose Chrome or Edge when you need to reproduce behavior in that browser, and use the integrated target when its manually configured debugging setup fits your project.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Why do my TypeScript breakpoints not bind?

The browser is executing generated JavaScript and the source map may be absent, inaccessible or incorrectly rooted. Verify the build’s source maps and the debugger’s URL and mapping settings.

Frequently Asked Questions

Can VS Code test HTML without a framework?

Yes. Open the local HTML file in the integrated browser or an external browser and inspect the rendered page, interactions and console. Automated assertions still require a testing tool appropriate to the project.

Does the Testing view run end-to-end browser tests automatically?

Only when an installed extension supports that framework and publishes its discovery and results. The Testing view itself is an interface, not a universal test runner.

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

Should I debug in the integrated browser or Chrome?

Use either supported workflow. Choose Chrome or Edge when you need to reproduce behavior in that browser, and use the integrated target when its manually configured debugging setup fits your project.

Why do my TypeScript breakpoints not bind?

The browser is executing generated JavaScript and the source map may be absent, inaccessible or incorrectly rooted. Verify the build’s source maps and the debugger’s URL and mapping settings.

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.