-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vscode升级到1.32.1后,debug启动时代码卡住,无法启动 #3534
Comments
从截图来看, master 启动成功了,也被 attach 了。 具体为何没生效,就不知道了,这属于 VSCode 调试 Node 的问题了,跟 Egg 这层关系不大。 我本地同样的版本,无法复现。参见最后的回复: 临时解决方案:如果你不需要调试启动期的代码,直接把 inspect-brk 干掉。 |
贴下你的 launch.json |
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Egg Debug",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"debug",
"--",
"--inspect-brk"
],
"console": "integratedTerminal",
"restart": true,
"protocol": "auto",
"port": 9229,
"autoAttachChildProcesses": true
},
{
"type": "node",
"request": "launch",
"name": "Egg Test",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"test-local",
"--",
"--inspect-brk"
],
"protocol": "auto",
"port": 9229,
"autoAttachChildProcesses": true
},
{
"type": "node",
"request": "attach",
"name": "Egg Attach to remote",
"localRoot": "${workspaceRoot}",
"remoteRoot": "/usr/src/app",
"address": "localhost",
"protocol": "auto",
"port": 9999
}
]
} |
好的,我看看。 |
试了下,没能复现。 T_T |
@lixiaolihua 我这边偶发会触发,不确定是不是 VSCode 自己的 Bug,当卡住的时候: F1 -> Debug: attach to node process -> 选择 5800 那一条,就能下去了。 感觉是 VSCode 检测子进程这里有问题,但我这复现频率不高。 你现在可以选择其中一种解决方式:
|
好的,3Q。 |
貌似是vscode的问题 |
感谢反馈~ |
同样的情况,有时候会成功个几次,成功的时候会在agent_work.js,app_worker.js出现断点,得自己手动点击跳过断点才能继续下去。 |
@atian25 去掉 --inspect-brk 确实能解决这个问题。 |
。。。 不要乱猜 egg master -- 9229 |
之前认为是端口号的问题,是我搞错了。感谢@atian25指出问题。 但是我现在找到了稳定重现和临时解决问题的方式,我是Mac OS 10.14.6可以重现,大家可以试试看: 根据快速入门初始化一个空项目; 怀疑是TS引起的,所以自己摸索出了临时解决方式: "egg": { "egg": { |
额。。。感谢反馈,我们看下,有可能是 egg-ts-helper fork 的进程也接收了 brk 这个参数,导致阻塞了,cc @whxaxes |
@datouxia 解决,同 Macos 10.15.2 + VS Code 1.41.1 |
我这边是vscode第一次打开,调试没问题,第二次之后就稳定卡死。看了进程取样确实是三个进程都在等待信号 日志供参考 egg-bin进程取样 agentworker进程取样 start-cluester进程取样 |
去掉 brk 吧 |
vscode升级到1.32.1后,debug启动时代码卡住,无法启动
The text was updated successfully, but these errors were encountered: