-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Debug context lost on multiple connections #301
Comments
I am getting this too, since the last week changes. The only way to fix is reset the debug session and try again. I would fix myself but wouldn't know where to start. |
Hi, |
Same here. Previous version was working fine. |
Having the same issue here on multiple machines. I only have a couple seconds to see the variables when it stops at a breakpoint before some ajax heartbeat in WordPress kills my debug session. Seems to be a bug introduced in v1.12.5. |
I agree with the general consensus that the issue seems directly related to |
As per steyep, rollback is the way to go. |
'Install From VSIX' is a menu option in the "..." button dropdown in the extensions tab in VS Code for anyone else who didn't know how to install these .vsix files |
I've also had the same problem, PHP 7.2.7, Xdebug 2.6.0, rollback the plugin to the previous version v1.12.4 work, need to turn off auto update as well. |
@felixfbecker Yes I'll look into it today. tl;dr: I'm going to work on a proper solution today but if I can't fix it by the end of the day, I'll at least put in a PR for a stop-gap fix to disable the part of the code causing it. So I'm about 95% sure this is what is causing it: I think that is sometimes sending a continue signal when it is actually still paused. I have a free day today so I'll work on fixing that, if I'm not able to come up with a solution today then at the very least, I'll put in a PR to disable that part of the code so it does not send the signal at all. Since the problem it is fixing is not nearly as big of a deal as the new bug it caused. For context, in case anyone is curious why it sends the continue signal in the above snippet: Without it, when you click continue or step or any of the options, the debugger does not realize that xdebug has indeed "continued" with executing PHP code, at least not until the next time it pauses or the script is done. This results in the UI feeling like nothing happened, especially if clicking continue ends up running some PHP code that takes a while before it gets to the next breakpoint. The only hint that it did continue is that trying to interact with the context does not work, since the code has already moved on, and trying to eval code won't work for the same reason. I think the "opposite" problem is happening now which is worse than the original problem that it fixes, now instead of looking like it is paused when it is not, it looks like the code continued when it did not. So like I said above I'll try to come up with a solution that will allow neither to happen, but if I do not make progress today I'll put that PR in place since the old problem is not as bad. |
@felixfbecker So I made 2 PR's for this because the actual solution ended up being a refactor that could likely take some time for discussion etc. So the first PR #307 just kills the part causing this error, and re-introduces the issue with the UI seeming to hang. The second PR #308 re-fixes the ui-seems-to-hang problem the "right" way (see the description on the PR). Both of course I tried to test as thoroughly as possible. |
A debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. 'launch' or 'continue'. It is only necessary to send a 'continued' event if there was no previous request that implied this. Note: there is still the problem that it will seem to "hang" when you continue and the PHP code takes a while to run, #308 will fix that. Fixes #301
🎉 This issue has been resolved in version 1.12.6 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
A debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. 'launch' or 'continue'. It is only necessary to send a 'continued' event if there was no previous request that implied this. Note: there is still the problem that it will seem to "hang" when you continue and the PHP code takes a while to run, xdebug#308 will fix that. Fixes xdebug#301
Relates to: #19 #167 #294 #231
PHP version: 7.2.7
XDebug version: 2.6.0
Adapter version: 1.12.5
Issue
When multiple connections are received, the debug context of the previous connection(s) cannot be retrieved from the editor.
For larger codebases (tested with WordPress) it seems that both debug contexts are lost resulting in an empty 'Call Stack', meaning the 'Call Stack' window is empty. The first connection is kept paused, whereas the second gets executed without pausing.
Steps to reproduce
Given the following PHP script
debug-multi.php
:Step 1
Open a terminal and execute
export XDEBUG_CONFIG="idekey=vscode"; php debug-multi.php
.The adapter correctly stops on the line following
xdebug_break()
:Step 2
Open a terminal and execute
export XDEBUG_CONFIG="idekey=vscode"; php debug-multi.php
.The adapter correctly stops on the same line as step 1, but the previous request is shown as "Running" even if it is still paused (shell command has not returned):
Configuration settings
launch.json:
php.ini:
Logs
First connection
1-adapter.log
Second connection
2-adapter.log
The text was updated successfully, but these errors were encountered: