JavaScript Awesome Development Environment (in Emacs) https://petton.fr/git/nico/jade

Nicolas Petton 7cd363187a Make sure no REPL buffer is used for several connections 6 days ago
screenshots 6e72c17e39 crop the debugger screenshot 7 months ago
test 87697c66f8 Add regression tests for jade-active-connections 4 months ago
.drone.yml 78afe28430 Replace travis builds with drone 4 months ago
.gitignore 7ae0983c03 Make console messages interactive as in direct repl evaluation 6 months ago
Cask 843b19dad7 Make websocket a runtime dependency 3 months ago
LICENSE eec403f827 Add LICENSE and readme 9 months ago
jade-backend.el ebef12ab55 Fix #16 1 month ago
jade-chrome.el 331651fa3e Handle errors in connections to Chrome 5 months ago
jade-debugger.el fc0c467db0 Fix debugger evaluation 4 months ago
jade-faces.el 3cab1efb16 Extract frames url face 5 months ago
jade-inspector.el 57ab364377 Fix the history of jade inspectors 7 months ago
jade-interaction.el fe482e2cc5 Fix jade-reload 4 months ago
jade-nodejs.el cc68a20060 Split the v8_inspector and webkit protocols 1 month ago
jade-render.el b7e6d0608e Better rendering of links 4 months ago
jade-repl.el 7cd363187a Make sure no REPL buffer is used for several connections 6 days ago
jade-scratch.el 83ad172b96 Do not globally mutate company-backends 1 month ago
jade-test-helpers.el 87697c66f8 Add regression tests for jade-active-connections 4 months ago
jade-v8-inspector.el 7cd363187a Make sure no REPL buffer is used for several connections 6 days ago
jade-webkit.el 7cd363187a Make sure no REPL buffer is used for several connections 6 days ago
jade.el 3e41fa6f13 Load seq before any other dependency. 1 week ago
readme.md cc68a20060 Split the v8_inspector and webkit protocols 1 month ago
run-tests.sh c6225418f2 Fix running tests 7 months ago

readme.md

Jade MELPA Build Status

JavaScript Awesome Development Environment (in Emacs)

Jade connects to a browser tab or nodejs process and provides many features for JavaScript development, including:

  • a REPL (with auto completion) & object inspection;
  • an inspector, with history and navigation;
  • a scratch buffer (M-x jade-scratch);
  • JavaScript evaluation in JS buffers with jade-interaction-mode;
  • a stepping Debugger, similar to edebug, or cider.

Screenshots

The REPL with company-mode

REPL

The REPL showing clickable output

REPL

The inspector

REPL

The stepping debugger, and an inspector on locals

REPL

Getting started

(Emacs 25 is required)

It's available on melpa:

M-x package-install jade

Connection to a chrom[e|ium] tab

Chrom[e|ium] >= 54.0 is required for Jade to properly work (debugging protocol v1.2).

Start chrom[e|ium] with the --remote-debugging-port flag:

chromium --remote-debugging-port=9222 https://gnu.org

Evaluate M-x jade-connect-to-chrome.

Connection to a nodejs process

Nodejs >= 7.0.0 is required for Jade to work.

Start a node process with the --inspect flag:

node --inspect myfile.js

If you wish to break on the first line of the application code, start node using:

node --inspect --debug-brk myfile.js

Node will tell you to open an URL in Chrome:

chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:PORT/PATH

Evaluate M-x jade-connect-to-nodejs RET 127.0.0.1 RET PORT RET PATH, PORT and PATH are taken from the ws parameter of the above URL.

Connecting Jade to the node process will open a debugger on the first line of the application code.

JavaScript evaluation in JS buffers

Add the following to enable evaluation in all JS buffers:

(add-hook 'js2-mode-hook #'jade-interaction-mode)

Then C-x C-e will evaluate the node before the point, and C-c M-i will inspect the result.

The entire buffer can also be executed with jade-eval-buffer.

Missing features

Jade is young, here's a list of missing/wanted features

  • Code evaluation using C-x C-e from project JS buffers
  • Adding breakpoints (to remove the need for debugger statements)
  • Network inspector (could get inspiration from restclient.el)
  • DOM inspector
  • Start processes (chromium, node, grunt, gulp, etc.) from Emacs and attach a jade connection to it.

Backends

There is currently support for Chrom[e|ium], & nodejs. The firefox backend is currently missing.