这感觉很傻,但我无法让节点检查器/ node-debug工作。
说明要求执行npm安装,然后运行node-debug web.js。所以我就这么做了。现在我有一个可爱的浏览器窗口打开,显示我的代码与断点.也不知道用哪个url来真正访问代码。
检验员在http://localhost:8080/debug?port=5858,终点站说:
> node-debug web.js
debugger listening on port 5858
Node Inspector is now available from http://localhost:8080/debug?port=5858
D
我正在尝试使用XDebug和Visual Studio Code在PHP代码中设置断点,这些代码都安装在Ubuntu Hyper-V虚拟机上。我使用的是PHP 7.2。
每当我在PHP代码中设置断点并刷新应该命中该断点的页面时,在Visual Studio代码中的弹出窗口中都会显示错误消息"command is not available“和"no the”。我在调试控制台中也得到了以下错误。
XDebugError: command is not available
at new Response (/home/ben/.vscode/extensions/felix
我想要断点到用于Mac的Intellij IDEA 2016.2中的webpack源代码。
it提示:
To debug "build-distributor" script, make sure $NODE_DEBUG_OPTION string is specified as the first argument for node command you'd like to debug.
For example:
{ "start": "node $NODE_DEBUG_OPTION server.js" }
但是,在调试web
当我尝试设置断点并调试文件时,调试器只是运行应用程序,而不会在断点处停止。这是我的代码:
console.log('123');
这是我的输出:
/usr/bin/node --debug-brk=39765 --nolazy index.js
debugger listening on port 39765
123
Process finished with exit code 0
有没有人知道问题出在哪里?
我使用的是angular-fullstack生成器和Webstorm 10。
node.js remote调试配置:
localhost: 127.0.0.1
port: 5858
当我输入'grunt serve:debug‘时:
Debugger listening on port 5858
Node Inspector v0.9.2
Visit http://localhost:8080/debug?port=5858 to start debugging.
Express server listening on 9000, in development mode
此时,lo
我希望能够将一条debugger语句(或类似的语句)直接放到我的代码中,并在我运行测试时获得一个REPL,这样我就可以与代码交互来调试东西了。
我知道Node (通过V8)支持开箱即用的debugger语句,但是您必须使用特定的标志(通过node debug、node --debug或node --debug-brk来运行代码--我并不真正理解它们之间的区别)。
Mocha也有相同的标志,当我运行mocha debug时,我确实在终端中得到一个调试器提示符:
< Debugger listening on port 5858
connecting to port 5858... ok
b
我正在使用节点调试,并且知道要为哪个文件和行设置断点。
下面是发生的事情:
debug> setBreakpoint('./services/search.js', 359) Warning: script './services/search.js' was not loaded yet. You can't list source code right now
为什么我不能“列出源代码”?如何动态添加断点(而不编辑添加debugger的源代码)?
我尝试了其他调试工具,并且很想使用Chrome工具,但不要认为这是可能的,因为我们的项目被困在v0
我在WebStorm的这个项目中设置了几个断点:
要了解它是如何工作的,请对自己进行代码审查。它通常是用yarn start编译的,但我也不能从WS 'run‘或'debug’。它抛出了一个错误:
import React from 'react';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:983:16)
at Module._compile (internal/mo