Change:
return; } <del> const stopListener = vscode.debug.onDidTerminateDebugSession(async (terminated) => { if (terminated === session) { stopListener.dispose(); this.lateDisposables.delete(stopListener); await vscode.debug.stopDebugging(createdSession); } </del> <ins> const stopListener = this.onDidSessionStop(async () => { stopListener.dispose(); this.disposables.delete(stopListener); await vscode.debug.stopDebugging(createdSession); </ins> }); <del> this.lateDisposables.add(stopListener); </del> <ins> this.disposables.add(stopListener); </ins> } private catchStartedDebugSession(predicate: (session: vscode.DebugSession) => boolean, cancellationToken: vscode.CancellationToken): Promise<vscode.DebugSession | undefined> {

Discussion:
I'm trying to use the configuration from website, but I'm facing a problem with the third option. I would like to use like these: and . But I can't find a way to achieve this with : Is it something possible? Thanks a lot
That launch config works for me and does what's expected. Note that the "serverReadyAction" in the latter config does not call the " debug client-side" launch config. For that you would want to use the and put in " debug client-side" for the .
Yes, I agree with you, both configurations are working as expected. I wasn't very clear in my first message, I will try to explain better. On my NextJs project, I can have the following configurations: The first one start the project and enables debugging on server side, the second one open chrome and enables debugging on client side. If I put on the second configuration, it will work just fine: What I want, is using the third configurations only to : start the project, enable debugging on server/client side and open chrome with my . Is it possible to achieve something like this ? I can't find any option in that case to make my working.
serverReadyAction doesn't accept additional configuration properties to pass to the launch config. The reason for this is mostly that intellisense doesn't work in that action (under the hood it's provided by a different extension) so writing configuration in the nested object is hard. The way to do this is define the separate launch config and reference it. Copying your original configuration set:
Your configuration plus two small additions almost give the result I'm looking for! I still have too issues with this: If I kill the (by clicking on the icon), is not automatically killed dispite the option. When I start , is automatically started, but I can see both elements here: !. Is it possible to hide the last one (wich should be automatically killed when is stopped)? I clearly saw that you explained to me why it was not possible to do this (use on a ) in a single configuration, but is there a "hacky" way the achieve my main goal? Or is something planned in the futur? Or maybe there is a way to fix my remaining concerns with the current configuration?

No, this is not possible and is not something we'd do, since you would not be able to control the debug session in that case. That's a bug, will put in a fix
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
/verified