Community
cancel
Showing results for 
Search instead for 
Did you mean: 
jbach1
New Contributor II
1,254 Views

console.log messages on the edison when running a Nodejs app

Jump to solution

Following this excellent tutorial on remote debugging using Visual Studio with the edison

http://www.codefoster.com/edison-vs/ Using Visual Studio to Write Node for Devices

However, simple question

How do you see any console.log messages on the edison when running a NodeJs app?

My only connection is via an ethernet dongle and I am ssh'ing in to run my node app.

Tags (1)
0 Kudos
1 Solution
Carlos_M_Intel
Employee
85 Views

Hi eco_bach

If your script is using the console.log to print outputs you should be able to see the outcome in your Serial Terminal.

For example, if you use this sample (newtest.js):

console.log('Hi echo_bach')

And you run the script with node you will see the outcome in your prompt.

root@Edison:~# node newtest.js

Hi echo_bach

root@Edison:~#

Let me know if this answers your question.

Regards;

CMata

View solution in original post

2 Replies
Carlos_M_Intel
Employee
86 Views

Hi eco_bach

If your script is using the console.log to print outputs you should be able to see the outcome in your Serial Terminal.

For example, if you use this sample (newtest.js):

console.log('Hi echo_bach')

And you run the script with node you will see the outcome in your prompt.

root@Edison:~# node newtest.js

Hi echo_bach

root@Edison:~#

Let me know if this answers your question.

Regards;

CMata

View solution in original post

jbach1
New Contributor II
85 Views

Thanks. So it has to ALWAYS be the same session that initiates the node app? Just wondering if there was a way to see the console.log messages from another open session.

Reply