根据eggjs vscode插件设置远程debug,但是报错如下,我确认ip和端口是正确的
复现步骤,错误日志以及相关配置launch.json如下
{
"type": "node",
"request": "attach",
"name": "Egg Attach to remote",
"localRoot": "${workspaceRoot}",
// "remoteRoot": "/usr/src/app",
"remoteRoot": "/home/xxx/project",
"address": "xxx.xxx.xxx.xxx",
"protocol": "auto",
"port": 9999
}
vscode错误如下
Error processing attach: Error: Could not connect to debug target at http://xxx.xxx.xxx.xxx:9999: Promise was canceled
at Object.retryGetNodeEndpoint (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/extension.js:1:123640)
at runMicrotasks (
-
操作系统 m1 Big Sur 11.2.3 (20D91)
-
Node 版本: node 12 lts
-
Egg 版本: package.json
"dependencies": { "@types/jsonwebtoken": "^8.3.7", "@types/mocha": "^2.2.40", "@types/node": "^7.0.12", "@types/semver": "^7.1.0", "@types/supertest": "^2.0.0", "autod": "^3.0.1", "autod-egg": "^1.1.0", "axios": "^0.19.2", "egg": "^2.6.1", "egg-alinode": "^2.0.1", "egg-bin": "^4.11.0", "egg-ci": "^1.8.0", "egg-cors": "^2.2.3", "egg-mock": "^3.16.0", "egg-redis": "^2.4.0", "egg-router-plus": "^1.3.1", "egg-scripts": "^2.6.0", "egg-sequelize": "^5.2.1", "egg-ts-helper": "^1.25.6", "egg-validate": "^2.0.2", "eslint": "^6.7.2", "eslint-config-egg": "^8.0.0", "factory-girl": "^5.0.4", "jsonwebtoken": "^8.5.1", "mysql2": "^2.1.0", "semver": "^7.1.3", "sequelize-cli": "^5.5.1", "tslib": "^1.9.0", "typescript": "^3.0.0", "uuid": "^7.0.2" }