🐙 See the examples repo on Github

insightdotjs/examples

Insight.js was designed to work anywhere JavaScript runs. It leverages the widespread adoption of the Babel compiler ecosystem to instrument your code, then uses a runtime to beam evaluation records back to VSCode over a localhost WebSocket.

As of now, Insight.js has been tested (code samples here) with Node.js, Vue, Webpack, Create React App, Next.js, Jest, Vite, and Ionic (and Svelte is WIP), with plenty more integrations on the way.

1. Activate the App Monitor in VS Code

Simply run Insight: Start App Monitor from the Command Paulette. (You can configure the App Monitor to auto-start in your VSCode settings)

2. Install the kit (@insight-js/kit)

npm install -D @insight-js/kit # or yarn, pnpm, etc

3. Add Insight.js's Babel plugin

Note: Insight ships with code to ease integrating with Node.js and Jest, see below for examples.

You'll want your .babelrc to resemble something like below.

{
  "env": {
    "development": {
      "plugins": ["@insight-js/kit/babel-client"]
    }
  }
}

4. Run your app 🪄💫

That's it!


Node.js integration

Insight provides a helper runtime for Node.js, you can load it by importing @insight-js/kit/node, or simply pre-require it with Node's require flag node -r @insight-js/kit/node [your node app].

Jest integration

To get Insight.js working with Jest, you'll need to direct Jest to use a custom Babel configuration, as well as a special test environment. Check out the Jest example.