Can I execute nodejs javascript scripts in chrome devtools?

非 Y 不嫁゛ 提交于 2019-12-06 04:15:34
Arpan Shah

run your file with

node --inspect <your file name>.js

and then type in chrome

chrome://inspect

See https://nodejs.org/api/debugger.html#debugger_v8_inspector_integration_for_node_js for reference

--inspect-brk is used for breakpoint purposes, with that flag the debugger is ready to run your code but is expecting the developer to add something before it begins to run your script. There is a play button at the top corner of the chrome devtools debugger, and if there are no other breakpoints or debugger; statments in your code it will run as it would run or your workstation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!