我正在尝试使用vscode调试pm2集群模式下的应用程序。我可以在fork模式下执行此操作,但是现在我必须扩展我的应用程序才能尝试新功能。因此,我有以下设置:
VSCODE:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9228,
"restart": true
}
]
}
PM2:
module.exports = {
apps : [{
name: 'app',
script: 'src/index.js',
instance_var: 'INSTANCE_ID',
watch: true,
ignore_watch: ['logs', '.git', 'test', 'openshift'],
node_args : ['--inspect=9228'],
exec_mode : 'cluster',
instances: 2,
env: {
NODE_ENV: 'development'
}
}]
};
我得到了这个错误:
有人可以帮助我吗?泰!