CNode

node debug 怎么用

问答
Kkilobitcy发布于11 年前最后回复11 年前2 回复3847 浏览0 收藏

node debug 设断点,始终没成功过,求帮助

root@ADMIN:/workdir# node debug bin/www < Debugger listening on port 5858 debug> . ok break in bin/admin:7 5 */ 6

7 var app = require('../app'); 8 var debug = require('debug')('workdir:server'); 9 var https = require('https'); debug> sb(admin.js,13) repl:1 sb(admin.js,13) ^ ReferenceError: admin is not defined at repl:1:4 at Object.exports.runInContext (vm.js:64:17) at Interface.controlEval (_debugger.js:975:21) at bound (domain.js:254:14) at REPLServer.runBound [as eval] (domain.js:267:12) at REPLServer. (repl.js:279:12) at REPLServer.emit (events.js:107:17) at REPLServer.Interface._onLine (readline.js:214:10) at REPLServer.Interface._line (readline.js:553:8) at REPLServer.Interface._ttyWrite (readline.js:830:14) debug> sb(admin,13) repl:1 sb(admin,13) ^ ReferenceError: admin is not defined at repl:1:4 at Object.exports.runInContext (vm.js:64:17) at Interface.controlEval (_debugger.js:975:21) at bound (domain.js:254:14) at REPLServer.runBound [as eval] (domain.js:267:12) at REPLServer. (repl.js:279:12) at REPLServer.emit (events.js:107:17) at REPLServer.Interface._onLine (readline.js:214:10) at REPLServer.Interface._line (readline.js:553:8) at REPLServer.Interface._ttyWrite (readline.js:830:14) debug> sb('../controllers/admin.js',6) Warning: script '../controllers/admin.js' was not loaded yet. You can't list source code right now

查看回复

回复 (2)

I
i5ting#1·11 年前

搜node 调试 三法三例

K
kilobitcy#2·11 年前

谢谢 楼上的兄弟

参与回复
登录后即可参与回复。登录