What does the 2nd number after the colon in a node.js stack trace line mean?(node.js 堆栈跟踪行中冒号后的第二个数字是什么意思?)
问题描述
在 node.js 堆栈跟踪中总是有两个数字,行号然后是 : 和另一个数字.在下面的示例中,第一行 faye-redis.js:153:36 和 153 是该文件中发生错误的行号,但是数字 :36 是什么意思?
In a node.js stack trace there are always two numbers, the line number then a : and another number. In the example below, the first line has faye-redis.js:153:36 and 153 is the line number in that file for where the error is occurring, but what does the number :36 mean?
node_modules/faye-redis/faye-redis.js:153:36 • publish.notify
node_modules/faye-redis/faye-redis.js:72:16 • clientExists
node_modules/redis/index.js:532:9 • try_callback
node_modules/redis/index.js:614:13 • return_reply
node_modules/redis/index.js:266:14 • RedisClient.init_parser
events.js:96:17 • EventEmitter.emit
node_modules/redis/lib/parser/hiredis.js:43:18 • execute
node_modules/redis/index.js:488:27 • on_data
node_modules/redis/index.js:82:14 • none
events.js:96:17 • EventEmitter.emit
net.js:397:14 • onread
推荐答案
第一个数字是行(行号),第二个是列(行号).在 Javascript 中,许多编码人员习惯性地将大量代码用闭包等嵌套在一行中,或者使用像 YUI 压缩器这样的压缩器,因此它通常是相当相关的信息.
The first number is the row (line number), the second is the column (character on line). In Javascript many coders habitually nest a lot of code on a single line with closures et al, or use minifiers like YUI compressor, so it's often rather relevant information.
这篇关于node.js 堆栈跟踪行中冒号后的第二个数字是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:node.js 堆栈跟踪行中冒号后的第二个数字是什么意思?


- 为什么悬停在委托事件处理程序中不起作用? 2022-01-01
- 使用 iframe URL 的 jQuery UI 对话框 2022-01-01
- 我不能使用 json 使用 react 向我的 web api 发出 Post 请求 2022-01-01
- 如何显示带有换行符的文本标签? 2022-01-01
- 如何调试 CSS/Javascript 悬停问题 2022-01-01
- 是否可以将标志传递给 Gulp 以使其以不同的方式 2022-01-01
- 从原点悬停时触发 translateY() 2022-01-01
- 为什么我的页面无法在 Github 上加载? 2022-01-01
- 在不使用循环的情况下查找数字数组中的一项 2022-01-01
- 如何向 ipc 渲染器发送添加回调 2022-01-01