描述1
mac (f5) 点击debug的时候爆出的错误,全新项目。卡住没有跑到127.0.0.1:7001里面。
有时候跑到,也会乱debug。
cd /Users/xjc/my-project/test/egg-test ; /Users/xjc/n/bin/npm run debug -- --inspect-brk xjc@xjcdeMacBook-Pro
> test@1.0.0 debug /Users/xjc/my-project/test/egg-test
> egg-bin debug "--inspect-brk"
Debugger listening on ws://127.0.0.1:9229/102d871e-07ae-4f14-a68d-7a962c677d4b
For help see https://nodejs.org/en/docs/inspector
Debugger attached.
[egg-ts-helper] create typings/app/controller/index.d.ts (4ms)
[egg-ts-helper] create typings/config/index.d.ts (18ms)
[egg-ts-helper] create typings/config/plugin.d.ts (2ms)
[egg-ts-helper] create typings/app/index.d.ts (1ms)
2019-04-08 20:51:52,380 INFO 60743 [master] node version v9.11.2
2019-04-08 20:51:52,382 INFO 60743 [master] egg version 2.20.2
Debugger listening on ws://127.0.0.1:5800/641ccb34-46de-4220-8569-f66449342a10
For help see https://nodejs.org/en/docs/inspector
描述2
最新版本vscode,node js 9.x, 10.x,11.x 都试过不行。
描述3
执行 autod 等其他信息。
[DEPENDENCIES]
"dependencies": {
"egg": "^2.20.2",
"egg-scripts": "^2.11.0"
},
"devDependencies": {
"autod": "^3.1.0",
"autod-egg": "^1.1.0",
"egg-bin": "^4.12.2",
"egg-ci": "^1.11.0",
"egg-mock": "^3.22.1",
"eslint": "^5.16.0",
"eslint-config-egg": "^7.3.1",
"webstorm-disable-index": "^1.2.0"
}
Dependencies updates
Package Name Old Version Latest Version
egg ^2.15.1 ^2.20.2
DevDependencies updates
Package Name Old Version Latest Version
egg-mock ^3.21.0 ^3.22.1
egg-bin ^4.11.0 ^4.12.2
autod ^3.0.1 ^3.1.0
eslint ^5.13.0 ^5.16.0
eslint-config-egg ^7.1.0 ^7.3.1
[INFO] Write dependencies into package.json.
描述4
请求更详细的教程
官网https://eggjs.org/zh-cn/core/development.html#%E4%BD%BF%E7%94%A8-egg-bin-%E8%B0%83%E8%AF%95 服务器有启动,但是执行不到。
描述5
历史操作我是可以跑起来vscode debug的,这次怎么不行了。
描述6
{
// 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
}
]
}