safarishi / rawkit

🦊 Immediately Open Chrome DevTools when debugging Node.js apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Run

$ rawkit index.js

tutorial

Options

--inspect-brk alias brk

To break on the first line of the application code.

--extension=[port] alias e

Define a specific port to run the extension server on. Defaults to 1337.

--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 suppliment 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.

How is this different then other Node.js Chrome debugging tools?

Shout out to "Will" who made NiM (ie. Node --inspector Manager). Great project. NiM works by polling to see if new node debugging ports have opened to launch the inspector. That said, this is generally a slow & a bit clunky approach. Thus, I made this CLI tool to immediately open the developer tools when executed. Simple & fast.

About

🦊 Immediately Open Chrome DevTools when debugging Node.js apps

License:MIT License


Languages

Language:JavaScript 61.5%Language:HTML 38.5%