1

I'm using node-inspector for debugging my server code. every time I start my server I need to start node-inspector too. How can I start node-inspector without opening another terminal and write the command $ node-inspector?

Mohsen
  • 64,437
  • 34
  • 159
  • 186

1 Answers1

0

how about running the like of gnome-terminal --execute node-inspector or pterm -e node-inspector (the command depends on what terminal program you prefer) via child_process.spawn at the start of the server code?

Dan D.
  • 73,243
  • 15
  • 104
  • 123
  • yes but i'm not sure how one would invoke the terminal from the command line on that platform. but http://stackoverflow.com/questions/5577222/how-do-you-invoke-a-terminal-through-a-command-and-cd-to-a-directory references http://stackoverflow.com/questions/989349/running-a-command-in-a-new-mac-os-x-terminal-window/989357#989357 which says that it can be done via applescript using a command like `osascript -e 'tell application "Terminal" to do script "node-inspector"'`. – Dan D. Dec 12 '11 at 01:04