Skip to content

relief-melone/vscode-js-debug

Repository files navigation

js-debug

This repo contains the new, upcoming JavaScript debugger for VS Code. It's currently a work in progress, expect minor bugs and incompatibilities at this stage.

Installation

You can use this extension from the marketplace by:

  1. Installing the js-debug-nightly extension,
  2. Adding "debug.node.useV3": true and "debug.chrome.useV3": true to your user settings,
  3. Then you should be able to run and debug your programs without changing your launch config. If you can't, then please file an issue.

Or alternatively by self-hosting:

  1. Clone this repository and run npm install,
  2. Then either:
    • Run gulp package to package a .vsix you can install manually, or
    • Run npm run compile, then open the repository in VS Code and select "Run Extension"
  3. Then you should be able to run and debug your programs without changing your launch config. If you can't, then please file an issue.

Features

Multiple threads

  • Attaching to relevant browser threads: page, out of process iframes, web workers, related service workers

    Screen Shot 2019-07-25 at 9 27 36 AM
  • Node debugging auto-attaches to all Node sub-processes

    Screen Shot 2019-07-30 at 4 16 15 PM
  • Full stack debugging with all targets at a glance.

    Screen Shot 2019-07-30 at 4 13 21 PM

Console

  • Evaluate in selected execution context

    Screen Shot 2019-07-25 at 9 29 47 AM
  • Unified console for everything: service workers, page, workers

    Screen Shot 2019-07-22 at 9 54 30 PM
  • Top-level await in console

    Screen Shot 2019-07-22 at 9 40 36 PM
  • Serialized console output

    Screen Shot 2019-07-22 at 9 42 03 PM
  • Console message formatting improvements from CDT

    Screen Shot 2019-07-22 at 10 01 08 PM
  • Per-thread Output with timestamps available post-session

    Screen Shot 2019-07-24 at 10 28 05 PM Screen Shot 2019-07-24 at 10 29 43 PM
  • Complete command line API:

    • inspect(function) - reveal function definition

    • copy(value) - copies value into clipboard

    • queryObjects(prototype) - returns all heap objects of type

      Screen Shot 2019-07-22 at 10 32 03 PM

Debugging

  • Instrumentation breakpoints

    Screen Shot 2019-07-22 at 9 50 35 PM Screen Shot 2019-07-22 at 9 50 10 PM
  • Pretty print minified source with complete debugging support

    pretty_print

    Screen Shot 2019-07-22 at 9 56 12 PM
  • Step into async, step into Worker, etc

    step_into

  • All locations go through source maps: stack trace on pause, console methods, exceptions, function locations

  • Breakpoints set in source maps are guranteed to be resolved in time (in newer V8 versions).

Contributing

This project welcomes contributions and suggestions. See CONTRIBUTING.md for details.

About

The VS Code JavaScript debugger

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 72.8%
  • JavaScript 19.6%
  • HTML 7.4%
  • CSS 0.1%
  • Python 0.1%
  • C 0.0%