Node.js IDE review

4,446 views
Skip to first unread message

manimal45

unread,
Jun 6, 2011, 4:01:16 PM6/6/11
to nodejs
Hi,

Every node.js tutorial usually tells its readers : "Open your favorite
text editor and run the following command ...".
Readers can have a real time web server running with no external tools
but their terminal.
That's what got me in with node !

But once you get comfortable with node, and start team working, you
need code completion, function lists, classes browsers, debugging ...

There's not that much options open to help average coders like me.
Here's what I can tell from my experience using available tools I
found :
- Cloud9 IDE is a remarkable piece of software. What I miss when using
it is ... my local environment. I didn't figure out yet how to debug
code in the cloud when my databases are local (e.g : what if I locally
host a Redis database to do pub/sub, or if i have a mongodb storing my
app's data).
- Eclipse/Debugger : no success in getting it to work, it must be me,
but the 4 pages long Eclipse V8 debugger config tutorial page shows it
might not be that easy.
- Node inspector : Very much easier than Eclipse/V8 server daemon
but ... no code editor available. So switch between text editor,
terminal and browser.
- Akshell : looks a lot like cloud9 (with same remarks) but not
clearly node related.
- VJET[eclipse plugin] : seems like a good product -- surprisingly,
it didn't get too much attention from node.js community, but no
debugger availbale, so it's a very good code editor (which is not an
easy task !).
- gedit with class browser plugin : not too bad, might be possible to
get external tool plugin to run node script and debug -- not tried yet
- vim (which seems to get a lot of supporters in the node community) :
Coming from eclipse world, it's very hard to buy that path.

So, my choice is gedit + plugin + terminal + node debugger.
It's the closest environment I found to help me explore my project
files and classes and be a little more productive.
No debugging, very low exploration features, no documenting ...
I love node, but I really miss an Eclipse or Python IDLE tool to help
me.

Curious to know about other available options, or node's community's
standards.



Joshua Kehn

unread,
Jun 6, 2011, 4:03:58 PM6/6/11
to nod...@googlegroups.com
> I love node, but I really miss an Eclipse or Python IDLE tool to help me.

I don't miss Eclipse at all.

My normal developer tool stack consists of:

* TextMate
* VIM
* bash

Code completion? Don't need it.
Function lists? Available from both TextMate and VIM
Class browsers? JavaScript doesn't have classes
Debugging? Write code that isn't so complex you need a step through debugger

Regards,

-Josh
____________________________________
Joshua Kehn | Josh...@gmail.com
http://joshuakehn.com

> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>

Bas Dirks

unread,
Jun 6, 2011, 4:06:37 PM6/6/11
to nod...@googlegroups.com
The standard is pretty much vim / textmate from what I can tell, but I'm sure there are plenty of emacs users in the community. I have no idea why I'd ever need Eclipse though :D. I write all my Haskell/Python/JS/css/html/coffeescript/Scheme in vim. For team projects I can't really say anything useful

-- 
Bas Dirks
Sent with Sparrow

Ryan Gahl

unread,
Jun 6, 2011, 4:07:17 PM6/6/11
to nod...@googlegroups.com
On Mon, Jun 6, 2011 at 3:03 PM, Joshua Kehn <josh...@gmail.com> wrote:
Debugging? Write code that isn't so complex you need a step through debugger

or run app via 'node debug app.js' and use CLI debugging. works beautifully.

fwiw, I'm using Sublime Text 2 (awesome editor)

Matt

unread,
Jun 6, 2011, 4:12:02 PM6/6/11
to nod...@googlegroups.com
Personally I switched from TextMate to Sublime Text 2. In full screen mode on my 27" screens I can nicely get 3 code panels side by side, or 2 if I want it a bit wider, in a decent size font for my old eyes. It does pretty much everything I need.

For debugging I just do a lot of logging.

(of course these editors are Mac only, so YMMV).

Bas Dirks

unread,
Jun 6, 2011, 4:14:32 PM6/6/11
to nod...@googlegroups.com
Sublime is supposed to run on
Gonna have a look.

-- 
Bas Dirks
Sent with Sparrow
--

Joshua Kehn

unread,
Jun 6, 2011, 4:16:15 PM6/6/11
to nod...@googlegroups.com
I've got a copy of ST2 and Vico but haven't had the time to really work with either.

Regards,

-Josh
____________________________________
Joshua Kehn | Josh...@gmail.com

Isaac Schlueter

unread,
Jun 6, 2011, 4:28:15 PM6/6/11
to nod...@googlegroups.com
On Mon, Jun 6, 2011 at 13:03, Joshua Kehn <josh...@gmail.com> wrote:
> Code completion? Don't need it.
> Function lists? Available from both TextMate and VIM
> Class browsers? JavaScript doesn't have classes
> Debugging? Write code that isn't so complex you need a step through debugger

Easier said than done.

Node has a built-in stepwise debugger. Start your program wiht `node
debug foo.js`, and put a "debugger" statement somewhere in your code.
(The "debugger" statement is ignored if not running in debug mode.)

Joshua Kehn

unread,
Jun 6, 2011, 4:29:42 PM6/6/11
to nod...@googlegroups.com

Currently doing, and I don't find it hard.

That said, the node debug option is something I didn't know about. I have to try that sometime.

Isaac Schlueter

unread,
Jun 6, 2011, 4:34:16 PM6/6/11
to nod...@googlegroups.com
On Mon, Jun 6, 2011 at 13:29, Joshua Kehn <josh...@gmail.com> wrote:
> Currently doing, and I don't find it hard.

I don't use it very often, either. But, when you need to work out
some puzzling bit of code, especially something you're using that
someone else wrote, it's pretty awesome.

arunoda.s...@gmail.com

unread,
Jun 6, 2011, 4:43:21 PM6/6/11
to nod...@googlegroups.com
I also use Sublime Text2 on Ubuntu and Vim a bit.


--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.

Stephen Belanger

unread,
Jun 6, 2011, 4:49:44 PM6/6/11
to nod...@googlegroups.com
I use Geany when I need IDE functionality, vim for small stuff.

I definitely agree that debugging is important. When working on personal projects it's usually pretty easy to track bugs down, but when you need to dig into someone else's code the logic isn't always so obvious.

Onteria

unread,
Jun 6, 2011, 5:09:47 PM6/6/11
to nodejs
> But once you get comfortable with node, and start team working, you
> need code completion, function lists, classes browsers, debugging ...

I use the node plugin with WebStorm ( http://www.jetbrains.com/webstorm/
). Has the nice ability to run node scripts in the integrated console.
Also warns you about a few syntax snafus. Auto-complete might get a
bit noisy unless you fudge with the settings a bit. 30 days free,
costs right now $34 for the basic license.

Regards,
Onteria

Ryan Gahl

unread,
Jun 6, 2011, 5:46:40 PM6/6/11
to nod...@googlegroups.com

On Mon, Jun 6, 2011 at 3:14 PM, Bas Dirks <i...@basdirks.eu> wrote:
Sublime is supposed to run on
Gonna have a look.


Not only does it run on all those platforms. A single license applies to all platforms should you have a need to run it in multiple.

Ryan Gahl

unread,
Jun 6, 2011, 5:48:18 PM6/6/11
to nod...@googlegroups.com
On Mon, Jun 6, 2011 at 4:46 PM, Ryan Gahl <ryan...@gmail.com> wrote:
Not only does it run on all those platforms. A single license applies to all platforms should you have a need to run it in multiple.


plus it's relatively friendly "nagware" - fully unlocked and untimed trial with periodic (not too frequent) messages asking you to pay up :)

garym

unread,
Jun 6, 2011, 5:55:02 PM6/6/11
to nod...@googlegroups.com
Im an emacs user with the traditionally super customised setup. 

lintnode runs jslint against your code, highlighting jslint/syntax problems in the file 
js-comint for interactive console
autocomplete with a dictionary of javascript functions (haven't built the node dictionary yet, does anyone have a file I could use?)
code folding 
yasnippet for code templates 

What I like about node is that the http client request is a one liner and can be sent to the interactive console  with a single command. So feels like a really productive IDE environment.

Gary

mscdex

unread,
Jun 6, 2011, 6:25:53 PM6/6/11
to nodejs
For me it's Notepad++ for Windows and gedit or nano (with syntax
highlighting of course) for Linux.

Eric Muyser

unread,
Jun 6, 2011, 7:01:01 PM6/6/11
to nod...@googlegroups.com
Currently using Coda /w CoffeeScript, and "node debug," but would like to get around to trying ndb and the v8 eclipse plugin (with CF highlighting). http://stackoverflow.com/questions/1911015/how-to-debug-node-js-applications

On Mon, Jun 6, 2011 at 3:25 PM, mscdex <msc...@gmail.com> wrote:
For me it's Notepad++ for Windows and gedit or nano (with syntax
highlighting of course) for Linux.
--
You received this message because you are subscribed to the Google Groups "nodejs" group.

Joe Developer

unread,
Jun 6, 2011, 7:02:16 PM6/6/11
to nod...@googlegroups.com
I was using jEdit for a long time, recently switched to a local instance of cloud9ide and it is a perfect fit for me 

On Tue, Jun 7, 2011 at 5:25 AM, mscdex <msc...@gmail.com> wrote:
For me it's Notepad++ for Windows and gedit or nano (with syntax
highlighting of course) for Linux.
--
You received this message because you are subscribed to the Google Groups "nodejs" group.

Stephen Belanger

unread,
Jun 6, 2011, 7:23:30 PM6/6/11
to nod...@googlegroups.com
Just tried out Sublime Text 2. It is now my new favorite editor. Thanks for the awesome suggestion, bros. :)

Shimon Doodkin

unread,
Jun 7, 2011, 12:39:51 AM6/7/11
to nodejs
i plan to do something but i am not sure i will finish it soon.

http://github.com/shimondoodkin/appmanager

darren

unread,
Jun 7, 2011, 12:49:18 AM6/7/11
to nodejs
I downloaded the Aptana IDE but haven't gotten around to trying it. I
just use 'vi'... the vi / textMate ethos is one of the cool things I
like about node. It kind of forces you to maintain a clear mental
model of your code and keep things simple. That's my excuse anyway :-)

darren

unread,
Jun 7, 2011, 12:50:19 AM6/7/11
to nodejs
I downloaded the Aptana IDE but haven't gotten around to trying it. I
just use 'vi'... the vi / textMate ethos is one of the cool things I
like about node. It kind of forces you to maintain a clear mental
model of your code and keep things simple. That's my excuse anyway :-)

On Jun 7, 12:39 am, Shimon Doodkin <helpmep...@gmail.com> wrote:

Ted Young

unread,
Jun 7, 2011, 3:05:17 AM6/7/11
to nod...@googlegroups.com
I like vim.  Every time I log in to a server, there it is.

alessio_alex

unread,
Jun 7, 2011, 3:31:06 AM6/7/11
to nodejs
I'm also using VIM, it's got everything one needs. For example I have
a nice JSLint plugin that show me all my errors underlined, I have a
80 column visual delimiter, autocomplete for JavaScript functions,
autocomplete with existing words in the document, etc.

Besides, you can also use the terminal directly in VIM, which is cool.

Benjamin Gudehus

unread,
Jun 6, 2011, 4:29:08 PM6/6/11
to nod...@googlegroups.com
Code completion in JetBrains' WebStorm for Javascript is quite nice.
But doesn't work that nice with Node.js require().

--Benjamin

2011/6/6 Joshua Kehn <josh...@gmail.com>

Gevorg Harutyunyan

unread,
Jun 6, 2011, 6:40:33 PM6/6/11
to nod...@googlegroups.com
For me it is Notepad++ on windows and I use rsync to sync data with linux dev environment, where I use terminal to execute all application related tasks/library setups. I stopped on NPP after trying Eclipse, Jebrains IDEA, gedit, kedit, kate, vim, KDevelop, Cloud9 IDE and some other small or big tools under linux desktop/windows.

On Tue, Jun 7, 2011 at 3:25 AM, mscdex <msc...@gmail.com> wrote:
For me it's Notepad++ for Windows and gedit or nano (with syntax
highlighting of course) for Linux.
--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.




--
Best Regards,
Gevorg Harutyunyan

Chris Sanz

unread,
Jun 7, 2011, 12:50:32 AM6/7/11
to nod...@googlegroups.com, nod...@googlegroups.com
Same here!

BTW, do you guys know if they have a Jade+Stylus plugin? (for Sublime Text 2 that is)

Sent from my iPhone

Iain Shigeoka

unread,
Jun 6, 2011, 7:35:13 PM6/6/11
to nodejs
Something else to check out is WebStorm by JetBrains. It's almost
smart enough to be "pair programming" with it's code inspections, auto-
complete, and refactoring support. Right now, with just it's basic
HTML and JavaScript support for web coding it's very nice to use with
Node.js projects. The next release will be adding explicit support for
Node. Their Java IDE (Jetbrains IDEA) is considered best of breed for
Java and I think WebStorm is growing up fast to fill the same role for
those devs that like IDEs.

-iain

chrisbu

unread,
Jun 7, 2011, 3:27:28 AM6/7/11
to nodejs
Hmm... not sure if my post was successful, so apologies if this
appears twice!

I've been using cloud9ide successfully, but using the local rather
than the hosted version. I have cloud9, node, mongo etc... installed
on my ubuntu laptop, so local development is good, but even better is
that because cloud9 is browser based, when I'm in the office, I can
use my dual screen windows pc to develop in the same ide exactly as I
left it on the laptop.

Chris.

Christian Sanz

unread,
Jun 6, 2011, 5:12:20 PM6/6/11
to nod...@googlegroups.com
I just tried Sublime Text2 WOW, I love it.

Thanks guys

Chris Sanz
CTO/Co-founder

Geekli.st
@csanz


chrisbu

unread,
Jun 7, 2011, 3:18:11 AM6/7/11
to nodejs
I've been using local Cloud9 ide (rather than the hosted version).
This is working great for me - I have it installed on my ubuntu laptop
(along with node, mongo etc...), but I can develop using the browser
based ide using my windows desktop with big dual monitors when at my
office, or using my laptop when not.

It also has debug support.

Coming from an Eclipse & Visual Studio background, I do miss
intellisense, if not just for the ability to see a functions
documentation "right there"

ChrisBu.

chrisgl

unread,
Jun 7, 2011, 4:23:12 AM6/7/11
to nodejs
Hello.
I use Aptana Studio 3. Which is based on Eclipse. I use the standalone
Version, not the plugin.
There is some code completition. And it works well with HTML / CSS.
What I like about it is, that Console Windows are available. So I can
run my db in one "tab", node in the other and watch them in parallel
when Testing.

Floby

unread,
Jun 7, 2011, 4:27:29 AM6/7/11
to nodejs
My typical toolset for developping node apps is
* vim, with customized config and snippets [1]
* a terminal tab for git/vim+fugitive
* a terminal tab for my app
* log-file-watcher [2]
* node-inspector when logs are not enough

that's about it. When I need to track a bug created by someone else's
work, I use git bisect and ask the author to correct his bug =]
For databases I use phpmyadmin (but currently looking for a desktop
alternative on ubuntu) when using mysql, or mongo CLI when using
mongodb

I love terminals <3

[1] https://github.com/Floby/vim-config
[2] https://github.com/Floby/log-file-watcher

Bas Dirks

unread,
Jun 7, 2011, 5:28:40 AM6/7/11
to nod...@googlegroups.com
for vim I use (among other things)

pathogen for loading plugins @

syntax @

JSLint for vim @

restarting app during dev @
(for me nodemon has some problems serving resources properly)


-- 
Bas Dirks
Sent with Sparrow

Zhami

unread,
Jun 7, 2011, 8:22:37 AM6/7/11
to nodejs
I develop on my Mac and use Espresso as an editor, which I like very
much (http://macrabbit.com/espresso/). Curiously, when I used to
develop desktop apps on Cocoa I needed to use a debugger. But now that
I have now written Web apps with many thousands of lines of Javascript
code, I've never used a debugger. One thing that I'd like is to
integrate my git activity into the editing environment - would be
great if the IDE could show graphical depiction of the git status of
files, and show diffs. I most often do git at command line, but have
used GitX and Gitbox.

Sotonin

unread,
Jun 7, 2011, 12:40:30 PM6/7/11
to nod...@googlegroups.com
Just tried Sublime Text 2. and holy christ i love this thing. Thanks everybody who recommended it. Awesome editor.

Guy Halford-Thompson

unread,
Jun 7, 2011, 12:42:17 PM6/7/11
to nod...@googlegroups.com
There is a lot to be said for Cloud9. Its a great piece of software.
I especially like the debugging.

--
Guy Halford-Thompson - http://www.cach.me/blog

Stephen Belanger

unread,
Jun 7, 2011, 12:46:54 PM6/7/11
to nod...@googlegroups.com
Quite. The only thing I miss from other editors is code folding, but mostly just for editing other people's code. I don't know why other code feel a need to write 1000+ lines of code in a single file. >.>

I put together a handy "build" tool that allows me to launch my project in node and show the output in the build console. I almost don't even need the terminal open anymore. :O

Ryan Gahl

unread,
Jun 7, 2011, 12:56:49 PM6/7/11
to nod...@googlegroups.com

On Tue, Jun 7, 2011 at 11:46 AM, Stephen Belanger <cyruz...@gmail.com> wrote:
I put together a handy "build" tool that allows me to launch my project in node and show the output in the build console.


Could you throw up a gist of that? I doubt i'd stop using my F12 terminal, but am curious.

Stephen Belanger

unread,
Jun 7, 2011, 1:05:11 PM6/7/11
to nod...@googlegroups.com
It's super easy. Just make a file called Node.sublime-build in the packages folder somewhere and dump this in it;

{
  "cmd": ["node", "server.js"],
  "working_dir": "${project_path}",
  "selector": "source.javascript"
}

You can also use this to run the current file you have focused.

{
  "cmd": ["node", "$file"],
  "working_dir": "${project_path:${folder:${file_path}}}",
  "selector": "source.javascript"
}

At the moment I'm trying to get syntax highlighting working for stylus, I found a TextMate language definition that works for Jade here; https://github.com/i0n/i0n-custom-textmate/blob/master/Bundles/Jade.tmbundle/Syntaxes/Jade.tmLanguage

--

Daniel Latter

unread,
Jun 7, 2011, 12:59:01 PM6/7/11
to nod...@googlegroups.com
Is an eclipse build tool? If so, would you be kind enough to share it?

Thanks.
Dan-.

Barry Morrison

unread,
Jun 7, 2011, 10:53:12 AM6/7/11
to nod...@googlegroups.com
Could you provide links to your plugins for VIM? 

Much appreciated! 


--

skrenek

unread,
Jun 7, 2011, 10:54:36 AM6/7/11
to nodejs
I'll throw my hat into the Sublime Text 2 ring as well. I've used
just about all of the non-cloud-based IDEs, most recently being
TextMate. However, just after my trial ended, I was introduced to ST2
and have not looked back. If I could open a terminal window in one of
its panes I'd be in heaven. I prefer a modest amount of help from my
tools. Too much help and I start to forget how and why things work.
Coming from a heavy Java background, I've seen that time and again
with Eclipse. It can do so much for developers that they sometimes
forget why things are done a certain way. One of our standard
interview questions for Java devs was to write a class in Notepad and
compile it using javac. After Eclipse came around, most interviewees
could not do it. It can be a tricky balance point. If you don't have
tooling support, it's much harder to gain adoption. If you have too
much, you can lower the bar to entry so much that all the script
kiddies in the world can play around and wreak general havoc.
So far, my favorite part of Node (apart from the freedom of
javascript) is the high level of sanity and intelligence I've found in
the community.

- Steve

Aikar

unread,
Jun 7, 2011, 4:30:58 PM6/7/11
to nodejs
As someone who's bounced around between quite a few editors and IDE's,
ive finally settled on Komodo Edit (the free one)

Its alot faster than eclipse based products, runs smooth, great code
completion/syntax support, and doesnt consume a ton of resources.
Its not perfect, but its the closest thing ive found so far ,and they
are working on specifically adding node.js support.

also:
> Debugging? Write code that isn't so complex you need a step through debugger
So don't do anything professionally? :/

Matt

unread,
Jun 7, 2011, 4:39:07 PM6/7/11
to nod...@googlegroups.com
On Tue, Jun 7, 2011 at 4:30 PM, Aikar <xdr...@gmail.com> wrote:
> Debugging? Write code that isn't so complex you need a step through debugger
So don't do anything professionally? :/

I've been writing code "professionally" for 17 years. I can honestly say I've barely used a debugger in the last 15 of those years (the first two years were Windows development).

Joe Developer

unread,
Jun 7, 2011, 6:09:29 PM6/7/11
to nod...@googlegroups.com
^^ 
Though I have to say that I find a debugger pretty handy when getting intimate with other peoples code, for larger systems especially. I also find tools like http://kcachegrind.sourceforge.net/html/Home.html invaluable in saving time when trying to explain just how messed up a given code base is, supporting refactoring decisions and motivating behavior modification. 

Tim Smart

unread,
Jun 7, 2011, 7:48:04 PM6/7/11
to nod...@googlegroups.com
GNU Screen, VIM, CTags and a decent window manager (like awesome etc)

Can't remember the last time I used a debugger...

Tim.

Floby

unread,
Jun 8, 2011, 4:32:28 AM6/8/11
to nodejs
GNU Screen ? That something I never managed to get used to. =)

On Jun 8, 1:48 am, Tim Smart <t...@fostle.com> wrote:
> GNU Screen, VIM, CTags and a decent window manager (like awesome etc)
>
> Can't remember the last time I used a debugger...
>
> Tim.
>
> On 8 June 2011 10:09, Joe Developer <joe.d.develo...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > On Wed, Jun 8, 2011 at 3:39 AM, Matt <hel...@gmail.com> wrote:
>
> >> On Tue, Jun 7, 2011 at 4:30 PM, Aikar <xdr...@gmail.com> wrote:
>
> >>> > Debugging? Write code that isn't so complex you need a step through
> >>> debugger
> >>> So don't do anything professionally? :/
>
> >> I've been writing code "professionally" for 17 years. I can honestly say
> >> I've barely used a debugger in the last 15 of those years (the first two
> >> years were Windows development).
>
> > ^^
> > Though I have to say that I find a debugger pretty handy when getting
> > intimate with other peoples code, for larger systems especially. I also find
> > tools likehttp://kcachegrind.sourceforge.net/html/Home.htmlinvaluable in

rtweed

unread,
Jun 8, 2011, 5:17:14 AM6/8/11
to nodejs
I've always enjoyed the fact that I don't need to spend days learning
an IDE in order to code in Javascript. It's just text at the end of
the day. it suits my minimalistic approach to development: I've
always found I can develop far faster unencumbered by all that stuff
in IDEs that is intended to help me, offering me help with stuff I
never knew I even needed help with!

With most of my development in Node being on multiple local and remote
Linux machines and VMs, what I've found to work best for me is WinSCP
which, when you double-click a file on the remote system, brings up a
simple Notepad-like editor window. I can have as many open as I like
at any one time. Very simple, no frills, but it just works and gives
me a very clear view of what's where on the Linux server(s). Funnily
enough it's one of the few reasons I still use a Windows machine
(actually a VM): I've never found any equivalent that I like as much
on the Mac. TextWrangler comes close but I prefer the remote file
explorer view and interface of WinSCP.

As for debugging, I've personally never found a need for one and get
as excited about debuggers as I do about IDEs. console.log gives me
everything I've needed to do, even on complex Node.js work.

But that's just the way I am - choose what's best for you and gets you
results most quickly and easily and ignore my whacky choice. Like I
say, it's just text!

Rob

Diogo Resende

unread,
Jun 8, 2011, 5:43:37 AM6/8/11
to nod...@googlegroups.com
Thank you! I did not know this. Despite the fact that is in python,
it's very fast :)

Just a question about it.. is there a way of doing splitview on the same file?

Diogo Resende

unread,
Jun 8, 2011, 6:19:54 AM6/8/11
to nod...@googlegroups.com
On Wed, Jun 8, 2011 at 10:43 AM, Diogo Resende <dio...@gmail.com> wrote:
> Thank you! I did not know this. Despite the fact that is in python,
> it's very fast :)
>
> Just a question about it.. is there a way of doing splitview on the same file?

Found it. Not intuitive but it works perfectly.

1. Split view in 2 rows for example (Alt+Shift+8)
2. File -> Clone File
3. Move clone to row 2
4. :D

Paul Tanner

unread,
Jun 8, 2011, 7:39:23 AM6/8/11
to nod...@googlegroups.com
I also a fan of console.log but it seems to have one significnt
limitation: that is when the object you want to log contains objects
within objects etc. Clearly one can write a kind of var_dump
function. Before I do that is there one that's built-in? If so I
have not discovered it yet.
Paul

At 10:17 AM 6/8/2011, you wrote:
>As for debugging, I've personally never found a need for one and get
>as excited about debuggers as I do about IDEs. console.log gives me
>everything I've needed to do, even on complex Node.js work.

Paul Tanner - Virtual Technologies - http://www.virtual-techno.com
Tel: +44 1494 581979 Mob: +44 7973 223239 mailto:pa...@virtual-techno.com

Linus G Thiel

unread,
Jun 8, 2011, 7:47:35 AM6/8/11
to nod...@googlegroups.com
Paul,

console.dir is your friend:
http://nodejs.org/docs/v0.4.8/api/stdio.html#console.dir

Also, console.log can take many arguments, and you can also use
printf-like arguments (with %j for JSON, if I remember correctly):
http://nodejs.org/docs/v0.4.8/api/stdio.html#console.log

> --
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en.
>
>

--
Linus G Thiel
Hansson & Larsson
http://hanssonlarsson.se/
+46 709 89 03 85

Steve Krenek

unread,
Jun 8, 2011, 10:08:19 AM6/8/11
to nod...@googlegroups.com
Will util.inspect not work for you?

<snip>
var util = require("util");
console.log(util.inspect(someNestedObject)));
</snip>

This has worked well for me so far.

Cheers,
Steve

--

Joshua Kehn

unread,
Jun 8, 2011, 10:17:22 AM6/8/11
to nod...@googlegroups.com
I normally use console.dir for that.

Regards,

-Josh
____________________________________
Joshua Kehn | Josh...@gmail.com
http://joshuakehn.com

Steve Krenek

unread,
Jun 8, 2011, 10:17:52 AM6/8/11
to nod...@googlegroups.com
Does util.inspect not go deep enough for you?  It has worked well enough for most stuff I've encountered so far.

<snip>
var util = require("util");
console.log(util.inspect(myNestedObj));
</snip>

Cheers,
Steve

Thomas Shinnick

unread,
Jun 8, 2011, 1:53:24 PM6/8/11
to nodejs
On Jun 8, 9:17 am, Steve Krenek <st...@thevolary.com> wrote:
> Does util.inspect not go deep enough for you?  It has worked well enough for
> most stuff I've encountered so far.
>
> <snip>
> var util = require("util");
> console.log(util.inspect(myNestedObj));
> </snip>
>
> Cheers,
> Steve

> On Wed, Jun 8, 2011 at 6:39 AM, Paul Tanner <p...@virtual-techno.com> wrote:
> > I also a fan of console.log but it seems to have one significnt limitation:
> > that is when the object you want to log contains objects within objects etc.

As someone else mentioned, using the %j format specifier directly gets
you the util.inspect() capabilities to dump objects, and _nested_
objects too.

In fact the only time I use util.inspect() directly is when %j's
simple usage "works too well" and gets freaked by circular
dependencies among the nested objects. At that time I switch to using
arguments to inspect(), such as
util.inspect(arguments[i], false, 2)
to show only 2 levels of nesting.
Reply all
Reply to author
Forward
0 new messages