Skip to content

Commit

Permalink
docs: new VScode 1.14 default protocol changed. (#1212)
Browse files Browse the repository at this point in the history
Ref #1206
  • Loading branch information
fantasyroot authored and popomore committed Jul 21, 2017
1 parent 2b78b4c commit 24f2790
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/source/zh-cn/core/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ exports.proxyworker = {
"runtimeArgs": [
"run", "dev", "--", "--debug"
],
"protocol": "legacy",
"port": 5858
},
{
Expand Down Expand Up @@ -366,8 +367,10 @@ exports.proxyworker = {

当且仅当你的 Node.js 版本大于 7.x 时,可以使用 [Inspector Protocol] 进行调试。

VScode 升级 1.14 后,默认 protocol 由 [Legacy] 变为了 [Inspector]。如果仍需使用 [Legacy], 需手动指定。详情参考 https://github.com/Microsoft/vscode/issues/30629#issuecomment-315196813

在上面的调试配置中需要修改一些参数来开启新协议:
- `Launch Egg` 调整参数 `"runtimeArgs": ["run", "debug"]`
- `Launch Egg` 调整参数 `"runtimeArgs": ["run", "debug"]``"protocol": "inspector"`
- `Attach Worker` 添加参数 `"protocol": "inspector"`

此外,如果使用新协议还可以通过 chrome devtools 进行调试, 调试地址:
Expand All @@ -389,4 +392,4 @@ exports.proxyworker = {
[egg-bin]: https://github.com/eggjs/egg-bin
[VSCode]: https://code.visualstudio.com
[Legacy Protocol]: https://github.com/buggerjs/bugger-v8-client/blob/master/PROTOCOL.md
[Inspector Protocol]: https://chromedevtools.github.io/debugger-protocol-viewer/v8
[Inspector Protocol]: https://chromedevtools.github.io/debugger-protocol-viewer/v8

0 comments on commit 24f2790

Please sign in to comment.