Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to distinguish running debug session from disconnected client #668

Open
AnrDaemon opened this issue Oct 4, 2021 · 2 comments
Open
Assignees

Comments

@AnrDaemon
Copy link

PHP version: any
Xdebug version: any
VS Code extension version: 1.19

Your launch.json: irrelevant
Xdebug php.ini config: irrelevant

Xdebug logfile (from setting xdebug.log in php.ini): irrelevant
VS Code extension logfile (from setting "log": true in launch.json): irrelevant

Code snippet to reproduce: irrelevant

When you just started the debugger, it already shows "RUNNING" in call stack heading, even if no clients connected. And it will remain in "RUNNING" state, when last client disconnects.
This makes it impossible to distinguish a long-running code from terminated session.

@zobo
Copy link
Contributor

zobo commented Oct 6, 2021

Hi!
Yes, I agree, that is a problem, coming from the fact that there is one VS Code Debug Session running, and connected DBGP sessions presented as Threads.
Although I have a working implementation that does things differently, that would break every other IDE, as the implementation is VS Code specific.

When talking only VS Code, the best implementation would be to create a separate UI for letting the user "start dbgp listen socket" and only present connected DBGP engines as Debug Sessions...

What is doable, is that I present the DBGP listen socket as one Debug session and all others as separate Debug Sessions.. The issue I'm currently facing with this is "should the stop button close all sessions or just stop listening?" I think #571 is relevant here also...

This is the current implementation #517 I'll add some screenshots how it looks...

@AnrDaemon
Copy link
Author

AnrDaemon commented Oct 6, 2021

"should the stop button close all sessions or just stop listening?"

Can't it be both? I actually suggest two buttons:

  • Stop (the "square", terminate current thread)
  • Close debugger (red "codicon-close") - close socket and terminate all current sessions.
  • Alt+Close (the "codicon-debug-disconnect" mark) - close listening socket, but only terminate debugger if no sessions left active.

@zobo zobo self-assigned this Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants