Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Debugging with node-inspector

0
0
Hello ahmetuzun,

Based on a brief investigation, it looks like node-inspector expects to find certain node.js variables in the script environment. Here's one of the first messages ClearScript receives:
{"seq":12,"type":"request","command":"evaluate","arguments":{"expression":"JSON.stringify((function () {\n    return {\n      pid: process.pid,\n      cwd: process.cwd(),\n      filename: process.mainModule ? process.mainModule.filename : process.argv[1],\n      nodeVersion: process.version\n    };\n  })()).match(/.{1,80}/g).slice()","global":true,"maxStringLength":-1}}
And here's V8's response:
{"seq":3,"request_seq":12,"type":"response","command"
:"evaluate","success":false,"message":"ReferenceError: process is not defined","
running":false}
This appears to confuse node-inspector, as ClearScript receives no further messages. By the way, the tested and recommended V8 debugger for ClearScript is Eclipse with Google Chrome Developer Tools. More information is available in the ReadMe.

Update: Ah, it looks like you've already found a solution. Thank you very much for posting it!

Cheers!

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images