Link to home
Start Free TrialLog in
Avatar of purplesoup
purplesoupFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Pausing node.js in Visual Studio to see the output

I've been trying out the node.js tools for Visual Studio (2012 version).

http://www.hanselman.com/blog/introducingnodejstoolsforvisualstudio.aspx

If I run something with listen then the node.exe screen of course stays open and I can see what is written to the console.

However if there isn't any listen code the window closes immediately the code is run and you can't see the output.

It is possible to set a breakpoint which allows the window to stay open but it would be nice to be able to just either redirect the output to another window which doesn't close immediately or keep the node.exe screen open until it is closed.

I've had a search for solutions but they all seem pretty awkward like running a "wait" batch file on the code - is there a simple way to do this?
SOLUTION
Avatar of Alexandre Simões
Alexandre Simões
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of purplesoup

ASKER

Oh - is there a better debugger? I'm just learning node.js, I've done the code school course and downloaded node.js to discover it was just a command line console, so had a look around for a decent debugger and came across the Visual Studio addition.

Since I already have VS installed it seemed easier to use that than download a whole new IDE - how do you get the node.js debugger?

The node.js I downloaded just has the command prompt.
I had a go with this

http://nodejs.org/api/debugger.html

it seemed like something from the ark - I'm assuming there is something else available somewhere?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ok that makes sense - thanks - I'll put some points aside for the explanation.

Erm if anyone *does* know how to keep that node window open I'd appreciate it...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
leakim971 - yes I'm pretty sure that's the plug in I'm asking about. How do I keep the console window open when running code?
AlexCode - I've had a go with Sublime Text - how do I get the code to run (from within the editor, obviously)?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ok then it doesn't seem like there is a way, I'll close the question.