diff --git a/img/58.png b/img/58.png new file mode 100644 index 0000000..e4ac40a Binary files /dev/null and b/img/58.png differ diff --git a/zy-hook基础/hook基础.md b/zy-hook基础/hook基础.md index bd6bcf4..82ac463 100644 --- a/zy-hook基础/hook基础.md +++ b/zy-hook基础/hook基础.md @@ -136,4 +136,4 @@ es6 代理 Proxy 测试效果,找到js,在资源面板中打开,在顶部打上断点,控制台输入以上代码,测试效果。 -![debugger](../img/56.png) +![debugger](../img/57.png) diff --git a/zy-vscode无环境联调/.vscode/launch.json b/zy-vscode无环境联调/.vscode/launch.json new file mode 100644 index 0000000..42adffc --- /dev/null +++ b/zy-vscode无环境联调/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "type": "pwa-node", + "request": "launch", + "name": "启动程序", + "skipFiles": [ + "/**" + ], + "program": "${workspaceFolder}/test.js" + }, + { + "type": "pwa-node", + "request": "launch", + "name": "无环境浏览器联调", + "skipFiles": [ + "/**" + ], + "runtimeExecutable": "node-inspect", + "program": "${workspaceFolder}/test.js" + } + ] +} \ No newline at end of file diff --git a/zy-vscode无环境联调/test.js b/zy-vscode无环境联调/test.js new file mode 100644 index 0000000..2934828 --- /dev/null +++ b/zy-vscode无环境联调/test.js @@ -0,0 +1 @@ +console.log(1) \ No newline at end of file diff --git a/zy-vscode无环境联调/vscode无环境联调.md b/zy-vscode无环境联调/vscode无环境联调.md new file mode 100644 index 0000000..5c79317 --- /dev/null +++ b/zy-vscode无环境联调/vscode无环境联调.md @@ -0,0 +1,80 @@ +## 安装中文包 + + Chinese (Simplified) (简体中文) + +## 配置vscode + + { + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-node", + "request": "launch", + "name": "启动程序", + "skipFiles": [ + "/**" + ], + "program": "${workspaceFolder}/test.js" + } + ] + } + +## 安装插件 npm install -g + + // Node调试之node-inspect工具 + npm install -g node-inspect + +## 添加运行时可执行文件 + { + "type": "pwa-node", + "request": "launch", + "name": "无环境浏览器联调", + "skipFiles": [ + "/**" + ], + "runtimeExecutable": "node-inspect", + "program": "${workspaceFolder}/test.js" + } + +## launch.json 配置文件 + + { + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "type": "pwa-node", + "request": "launch", + "name": "启动程序", + "skipFiles": [ + "/**" + ], + "program": "${workspaceFolder}/test.js" + }, + { + "type": "pwa-node", + "request": "launch", + "name": "无环境浏览器联调", + "skipFiles": [ + "/**" + ], + "runtimeExecutable": "node-inspect", + "program": "${workspaceFolder}/test.js" + } + ] + } + +## 开启谷歌实验室功能 + +1. vscode启动程序 +2. 在谷歌浏览器中打开之后,按F12打开谷歌开发者工具可以看到下图所示内容 + +![debugger](../img/58.png) + +这样就可以无环境联调了 \ No newline at end of file