node-inspector

node-inspector shows 'No Properties' for objects

允我心安 提交于 2019-12-09 20:23:17
问题 I'm pretty new in the debugging scene, especially with node-inspecor. After I had installed node-inspector, I started my simple node app with the --debug parameter and was able to see the debug view at localhost:8080/debug?port=5858. When I let the app stop at this breakpoint: router.get('/people', function(req, res) { var num = 1; var str = 'rarf'; var obj = {x: 1, y: 2} console.log(req) // breakpoint }); and hover with the curser on the identifier, it shows as follows: req: Incoming Message

Debug meteorjs application with node-inspector

佐手、 提交于 2019-12-08 06:09:05
问题 I am trying to debug a meteor application at server side. I created an environment variable export NODE_OPTIONS='--debug'. I run meteor (version 0.7.0.1) command. It tells the debugger listening on port 5858. I start node-inspector (version v0.7.0-2) and point to 127.0.0.1:8080/debug?port=5858, but I can see only a couple of strings, Source, Console and a prompt > where I cannot write anything. I have this error in the console: “The connection to ws//127.0.0.1:8080/socket.io/1/websocket/Za…

Interactively debugging a Node.js application on Heroku?

余生长醉 提交于 2019-12-07 08:27:07
问题 My Node.js application runs correctly locally but it has errors once deployed to Heroku. I cannot use node-inspector to debug as it requires three ports, and Heroku allows only one port. https://discussion.heroku.com/t/how-to-debug-node-on-heroku-using-something-like-node-inspector/477/6 I cant use the debugger built into Node.js because I need a CLI to issue debugging commands. http://nodejs.org/api/debugger.html#debugger_debugger What is the best strategy for interactively debugging a Node

Chrome inspector console does not work with version 54.0.2840.99

落爺英雄遲暮 提交于 2019-12-05 22:25:05
I use node-inspector to debug JS with Chrome version 54.0.2840.99. I enter "node-inspector" in one windows cmd console and "node --debug-brk l:\dev\debug\test.js" in another windows cmd console. Open "http://127.0.0.1:8080/?ws=127.0.0.1:8080&port=5858" in Chrome. It's able to debug as usual. But I input "1 + 2" in Chrome console, press "Enter" , nothing happen. I would expect "3" is output to Chrome console. It did work with Chrome version 48.0.2564.116. I did not test with other Chrome versions. Is it a defect of the new Chrome versions? How to resolve the problem? I captured the pictures as

Debugging karma-jasmine tests with node-inspector

帅比萌擦擦* 提交于 2019-12-04 08:42:07
Almost the same question as Debugging jasmine-node tests with node-inspector BUT does anyone know how to use node-inspector with karma? Install the node-inspector globally from NPM: npm install -g node-inspector Then start the node-inspector and background the process (use fg to bring it back to the foreground and kill %1 to stop it): node-inspector & And then start your test runner like in debug mode this node --inspect ./node_modules/karma/bin/karma start Then connect to the inspector from your local loopback. To start debugging, open the following URL in Chrome: chrome-devtools://devtools

How to debug and log own code on the server side of Meteor?

会有一股神秘感。 提交于 2019-12-03 09:42:57
问题 Never mind. The reason this did not work: I forgot to meteor reset so debugger did not get a chance to stop. Duh! More info: I am using the method in the answer by Mason Chang to the related question, not the kill -s USR1 [proc_id] (where I could see the scripts, but not able to stop in the startup() function.). Also, I am using meteorite. I am trying to debug the Meteor.startup(function ()) code on Meteor server side (i.e., under /server ) with node-inspector, I have read this question, and

Node-inspector with Express 4

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 09:27:23
问题 I am trying to run node-inspector with an Express 4 App -- I am running this in a Vagrant box but am able to view the pages in the browser without any problems (I have the ports on the vagrant machine available to the host machine). I fire up the application either with npm start or node --debug bin/www and then start the node-debugger bin/www . I load the inspector in the browser and it hits the initial breakpoint on the first line but performing any action on the page to debug that would

How to stop the node.js inspector / Chrome Debugger on SIGINT?

怎甘沉沦 提交于 2019-12-03 03:54:56
问题 I have the following code to capture a ^C from the terminal and gracefully shutdown my Express app: process.on('SIGINT', () => { console.log('SIGINT received ...'); console.log('Shutting down the server'); server.close(() => { console.log('Server has been shutdown'); console.log('Exiting process ...'); process.exit(0); }); }); However if I start my node instance with --inspect , then the above code fails to stop the inspector and the Chrome debugger. When I restart my application, I get the

how to debug nodeunit using node-inspector

ぃ、小莉子 提交于 2019-12-03 02:41:25
I can do: I can test node.js modules using nodeunit . I can debug my node.js express site using node inspector . But how to debug nodeunit test using node inspector? I tried, but not working: nodeunit --debug myNodeUnitModule_test.js It's not working. I tried to install nodebug . And used it like this: nodebug /usr/local/bin/nodeunit myNodeunit_test.js But it's not working neither on ubuntu ( No such file or directory ) nor on mac ( env: node\r: No such file or directory ) Almost works node --debug /usr/local/bin/nodeunit ./routes/edit/bodyTelInfoArraysToObject_test.js where /usr/local/bin

How to debug and log own code on the server side of Meteor?

你。 提交于 2019-12-03 01:13:37
Never mind. The reason this did not work: I forgot to meteor reset so debugger did not get a chance to stop. Duh! More info: I am using the method in the answer by Mason Chang to the related question, not the kill -s USR1 [proc_id] (where I could see the scripts, but not able to stop in the startup() function.). Also, I am using meteorite. I am trying to debug the Meteor.startup(function ()) code on Meteor server side (i.e., under /server ) with node-inspector, I have read this question , and following the answer to change run.js , but somehow, my own script for the startup function does not