Question

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/lib/model.js:984:15)

I am refering to the "984:15"

I can tell the 1st one is the line number, but what does the "15" mean?

Apart from that, I have noticed that often times the line numbers point to something like "Data.js:6:2034" in my application code, only to find out that there is nothing at line "6", and the "2034" still making no sense.

Thanks!

Was it helpful?

Solution

It's the column number or char in that line.

Data.js:6:2034 - low line numbers, large char numbers indicate, that this is at least a compressed file (no whitespaces, no newlines etc).

A file like that should be treated with a formatter during debugging, otherwise it will be really hard.

OTHER TIPS

It's the character number at that line number

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top