debug

插件安装

安装 Debugger for Chrome

attach debug

debug 模式启动chrome

debug模式启动chrome,注意,chrome需要在path中存在,不存在配置下。

chrome --remote-debugging-port=9222

配置launch

launch.json

{
  "type": "chrome",
  "request": "attach",
  "name": "whatever",
  "url": "http://localhost:3000/",
  "webRoot": "${workspaceFolder}/",
  "port": 9222
}

chrome中添加filesystem

在chrome中打开测试连接,然后

1. F12打开控制台
2. Sources -> Filesystem -> +
3. 选择工程目录

vscode中launch

点击最左侧的run,选择自己设置的名字
whatever

原文地址:https://www.cnblogs.com/Searchor/p/13862386.html