Debugger: pwa-node task shows twice in the debugger
Summary
On Zed Preview 0.188.2
config:
{
"adapter": "JavaScript",
"label": "Debug Server",
"type": "pwa-node",
"request": "launch",
"program": "$ZED_WORKTREE_ROOT/server/dist/app.js",
"stopOnEntry": false,
"cwd": "$ZED_WORKTREE_ROOT/server"
}
Launching this creates TWO items in the debugger process dropdown, and defaults to the one that seems to show zero information in it. I have to switch every time to the other one for there to actually see the launched process console output, it's very frustrating.
Zed Version and System Specs
Thanks, I can reproduce this---we should do better here.
I just tried to reproduce this on main and realized that the behavior was improved by #31182, which is in the just-released v0.188.3-pre---could you upgrade and check whether the experience is smoother now? Thanks!
confirmed working on 0.188.3-pre. thanks!
nope I'm wrong. I could have sworn it did the first time, but I still have the issue.
After updating zed preview...
The child is the process I actually care about.
Also can you take another look at the other debugger related issues I raised this week?
I think we're going to continue having two sessions in the list here, since that reflects the underlying reality. Eventually it would be great to have a tree display to represent the parent/child relationships. However, we should now be automatically switching you to the child session so that the debugging experience is smooth---let me know if that's not the case!
VSCode just shows one session... Node developers are generally high-level programmers and will easily get confused when seeing two processes at the same time, even if it becomes a tree. I'd suggest some kind of flag that can expose these kind of parent processes for advanced usage... %99.99 of the time no node developer's going to care about the distinction.
That's probably the same for python, go devs too. It's too low-level to expose to people using those particular adapters.
And for me, who will want to juggle two active debugging sessions (server and client) it'll just potentially get in the way.
This isn't what I'd call good UX. Those "Debug Server/Client" options are kind of useless on their own.
I suggest when only one child process is fired up from the debugger, combine the debugger process and child process into one option.
So "Debug Server" would actually be the app.js, renamed.
If people want to force them to show separately, make that an opt-in setting. It's an advanced mode as almost 0% of people are going to be juggling multiple node.js/chrome instances under their debugging session.
edit: I thought something else was broken, dw about it
closing issue as out of date.
I'll re-paste my feedback:
"I suggest when only one child process is fired up from the debugger, combine the debugger process and child process into one option.
So "Debug Server" would actually be the app.js, renamed.
If people want to force them to show separately, make that an opt-in setting. It's an advanced mode as almost 0% of people are going to be juggling multiple node.js/chrome instances under their debugging session."