JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 23
  • Score
    100M100P100Q61939F
  • License MIT

Open chrome devtools debugger

Package Exports

  • rawkit

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rawkit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm version Build Status Build status Known Vulnerabilities Dependency Status devDependency Status Greenkeeper badge js-standard-style

rawkit

rawkit grabs the chrome inspector URL returned from the node --inspect command and immediately opens devtools. No more clicking, selecting, copying/pasting or navigating. Just run the command and jump into debugging.

Installation

$ npm i rawkit -g

or

$ yarn global add rawkit

Run

$ rawkit index.js

or utilizing npx

$ npx rawkit example.js

Don't want to install the Chrome Extension?

Homebrew install chrome-cli

$ brew install chrome-cli

rawkit will automatically detect chrome-cli and use it over prompting to use the Chrome Extension. Unfortunately, Windows users will still have to go through that first option.

tutorial

Options

By default, running rawkit can detect any main script that's been defined in the current working directory's package.json and run that. It also will detect the version of Node.js you're running to determine whether or not to fallback to older debug APIs.

--inspect-brk alias brk

To break on the first line of the application code.

--inspect-port alias p

The debugger port. Defaults to 9229.

--executable=[name] alias e

Specify the name of the executable. Defaults to google chrome.

--silent alias s

Hide stdout/stderr output from child process in the terminal window.

--canary alias c

Open the devtools in canary.

FAQ

Should this be in node core?

Maybe. A flag like --launch would be a nice supplement to --inspect. That said...

Opening internal Chrome links, externally, is not possible at the moment (ie. chrome:// or chrome-devtools:// in this case). This is most likely a security feature. That said, you can use a Chrome Extension as a proxy to make this work. Check out the RESEARCH.md for more information. You can also use something like this lighthouse/chrome-launcher.