mikemaccana
mikemaccana

Reputation: 123470

Collapsable/expandable browser-style console for node.js?

When I log an object in a browser console, I can expand/collapse keys which have 'large' (to display) values, eg, a key whose value is another object.

I'd like to be able to do the same for node. Eg, say I:

console.log(request) 

...in an express app. Express 'request' items are large, and will easily scroll right off the screen. Being able to expand/collapse larger items would be super useful.

Is there an collapsing/expanding console for node.js?

Upvotes: 4

Views: 2444

Answers (3)

Yuchen Huang
Yuchen Huang

Reputation: 311

Maybe you can log the object in the browser side console in which you can check property easily. bonsole, a simple way to log something in browser. Even in Linux, you can go to the LAN's ip to check it.

Upvotes: 0

rdrey
rdrey

Reputation: 9529

I've used interactive console apps (top, etc), and for me a REPL falls into that category. ;)

Here is a much improved REPL: https://github.com/Benvie/Node.js-Ultra-REPL

I don't think it allows you to collapse parts of an object, but this is in the works:

GUI-like interface with collapsable object views

It does provide Toggling hiddens and builtins at least.

Upvotes: 2

floatingLomas
floatingLomas

Reputation: 8747

node-inspector might be useful to you; it's not exactly what you seem to want, but it's capable of providing the information you're looking for.

Upvotes: 1

Related Questions