Skip to main content

All Questions

Tagged with
2 votes
2 answers
7k views

How to debug node process that exits unexpectedly with code 1, but no apparent error message, and unpredictably

I already have handlers for uncaughtException and unhandledRejection and I am thinking that this isn't a js error at all, as it happens at several different points in the code, and other times does ...
Tom's user avatar
  • 8,180
2 votes
1 answer
2k views

see execution time of javascript code next to each call

Is it possible to see execution time like the image bellow, but in Node without the gibberish in vscode javascript debugger or without using the console.time('debug') and console.timeEnd('debug') ...
Gérard Le Cloerec's user avatar
1 vote
1 answer
203 views

Are method entries and exits in NodeJS/V8 traceable through debugging APIs?

I'd like to know if it's possible to trace method entries and exits in NodeJS/V8. Context I know that NodeJS has some profiling options for Heap statistics and CPU usage. However I'm not interested ...
Byebye's user avatar
  • 1,131
0 votes
1 answer
475 views

Logging currently executing line of code in node

Is there a way to run a node script and log each executing line of code without modifying the script code? For example, given a simple script.js file with this content: const a = 1 const b = 2 a + b ...
tome's user avatar
  • 1,196
8 votes
1 answer
3k views

Specifications of V8 snapshot binaries / debugging

I stumbled with NW and it's ability to load "compiled javascript binary files". After further reading (first I thought that would be just some minified javascript) I discovered that the docs were ...
alexandernst's user avatar
  • 15.1k
0 votes
0 answers
195 views

How do I get the console to output in Chrome 60+ V8 debugger?

For instance: When I press enter (after typing childLogger at the bottom) nothing happens. There's no output. There's no output in my terminal either. I'm used to being able to use the console to see ...
jcollum's user avatar
  • 46.7k
2 votes
1 answer
121 views

Node.js stacktraces don't include user code

When debugging Node.js code I often encounter call stacks that do not include my program's code in them, only node_modules/non-user code, despite the current line of execution being at a location in ...
sabrehagen's user avatar
  • 1,647
2 votes
1 answer
3k views

Is there a way to get chrome-devtools (--inspect) to automatically detach from a process that has ended?

The process, as it is: start code with --debug --inspect: "debug": "node --max-old-space-size=8192 --debug=5567 --inspect dist/index.js", Open devtools with url provided, something like: chrome-...
jcollum's user avatar
  • 46.7k
3 votes
2 answers
1k views

Node.js: breakpoints in setInterval

I am debugging a node.js (Node version 6.2.1) program with setInterval() in it. The code is very simple: const log = console.log; let cnt = 0; const inc = () => { const beforeDebug = Date.now(...
Juriy's user avatar
  • 5,141
0 votes
0 answers
343 views

Objects losing value after function return in node.js

I have some code that is structured like this for part of a routing application in node.js: module.exports = function Router(){ var self = this;` var ROUTES = { "GET": {}, "...
Jacob McCollum's user avatar
1 vote
2 answers
541 views

Running and debugging node project in Eclipse

I want to run a node.js project locally and create a debugging session. Normally, this would be accomplished by running "debug as" a node project in Eclipse. However, when I run the debugging session, ...
Alexander Mills's user avatar
1 vote
1 answer
3k views

How do I change the port in debug mode in Eclipse?

I am trying to debug a node.js project in Eclipse, running the code locally. I choose "debug as node.js project", but I cannot seem to change the port from the default. In other words I want to run ...
Alexander Mills's user avatar
2 votes
2 answers
2k views

Nodeclipse debugger ignoring breakpoints

I'm using Nodeclipse 0.10 with nodemon, but when I try to debug my script it doesn't stop at any of my breakpoints. I've already seen this and this answer but it hasn't helped. Occasionally, it will ...
BadIdeaException's user avatar
0 votes
1 answer
71 views

Weird Bug in my Javascript Scope

I Have run across a weird bug, where an exported function completely ignores the passed parameter and instead generates its own parameter. My code is as follows: exports.returnThumbs = function(req, ...
August Brenner's user avatar
0 votes
2 answers
329 views

V8 JavaScript stack trace, what do the trailing numbers mean?

Alright, so this might be a quick one... I am working in Node.js I can't seem to figure out what do the trailing numbers in a stack trace mean. at Function.findById (/home/.../node_modules/mongoose/...
Abdullah Khan's user avatar

15 30 50 per page