Wednesday, 31 May 2017

Node.js inspect console commands return undefined error

I launch my script with:

node --inspect=1234 index.js

Then open chrome devtools inspector and connect to it.

If I type console.log('hello') it works and outputs message to console.

However if I type any function or variable contained in my script, it throws an error:

Uncaught ReferenceError: "my func / var" is not defined(…)(anonymous function) @ VM107:1

How to make it see and enable to interact with the contents of my script?



via Anonymous

No comments:

Post a Comment