NestJS project debug - debugger disconnects

I have a basic nestjs project, freshly created, and have configured a basic launcher that works very well with vscode:

{
“version”: “0.2.0”,
“configurations”: [
{
“type”: “node”,
“request”: “launch”,
“name”: “Debug Nest Framework”,
“runtimeExecutable”: “npm”,
“runtimeArgs”: [
“run”,
“start:debug”,
“–”,
“–inspect-brk”
],
“autoAttachChildProcesses”: true,
“restart”: true,
“sourceMaps”: true,
“stopOnEntry”: false,
“console”: “integratedTerminal”,
}
]
}

With cursor, the debugger gets disconnected immediately after I launch it, without any error. If I change console to other modes, it works, but I have other problems. Anybody has this problem?