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

Interface is not updated after continuing execution #150

Closed
scottsb opened this issue Mar 15, 2017 · 6 comments
Closed

Interface is not updated after continuing execution #150

scottsb opened this issue Mar 15, 2017 · 6 comments

Comments

@scottsb
Copy link

scottsb commented Mar 15, 2017

Environment Information

PHP version: 7.0.16
XDebug version: 2.5.0
Adapter version: 1.10.0

Your launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "port": 9000,
            "localSourceRoot": "${workspaceRoot}/pub",
            "serverSourceRoot": "/var/www/html/[redacted]/pub",
            "log": true
        }
    ]
}

XDebug php.ini config:

zend_extension = xdebug.so

[xdebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_connect_back = 1
xdebug.remote_log="/tmp/xdebug.log"

XDebug logfile (relevant portion only):

<- run -i 7
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="7" status="break" reason="ok"><xdebug:message filename="file:///var/www/html/[redacted]/vendor/magento/framework/App/ErrorHandler.php" lineno="61" exception="Exception"><![CDATA[Notice: unserialize(): Error at offset 0 of 1 bytes in /var/www/html/[redacted]/vendor/magento/data-migration-tool/src/Migration/Handler/SerializeToJson.php on line 28]]></xdebug:message></response>

Adapter logfile (relevant portion only):

-> continueRequest
{ command: 'continue',
  arguments: { threadId: 2 },
  type: 'request',
  seq: 40 }
<- continueResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 40,
  command: 'continue',
  success: true }

Issue Statement

When code execution is continued after a breakpoint (by clicking "play" button), VSCode provides no response in the interface, continuing to say it's stopped on a breakpoint. In fact, the code has continued executing, and for a long-running process, may continue to do so for a long time. I intuit that the extension is waiting for the response from the remote before updating the UI, but this is problematic, because the protocol doc is explicit that a synchronous reply cannot be expected:

The response to a continue command is a status response (see status above). The debugger engine does not send this response immediately, but rather when it reaches a breakpoint, or ends execution for any other reason.

https://xdebug.org/docs-dbgp.php#id45

@chriswatt
Copy link

chriswatt commented Oct 3, 2017

I was facing the same issue, breakpoints were hitting but debug commands (Step Over, Into etc..) weren't working.

The problem was that I had some old variables/code in the WATCH panel that was causing xdebug to throw errors (only discovered looking through the xdebug log). Clearing the WATCH panel solved it, all debug commands work again.

@chriswatt
Copy link

Related issue #148

@datenzar
Copy link

Thanks, that solved my issue!

@scottsb
Copy link
Author

scottsb commented Oct 18, 2017

For what it's worth, what you're describing @chriswatt (and what is covered in #148) is a different case than what I originally reported here. This issue occurs whether there are watches or not: it happens all the time when you "continue" a long-running process after breaking.

@miseeger
Copy link

I was facing the same issue, breakpoints were hitting but debug commands (Step Over, Into etc..) weren't working.

The problem was that I had some old variables/code in the WATCH panel that was causing xdebug to throw errors (only discovered looking through the xdebug log). Clearing the WATCH panel solved it, all debug commands work again.

This made my day 👍 Thank you @chriswatt for the hint!!! I was almost going insane. Didn't consider the WATCH panel 🤦‍♂

@zobo
Copy link
Contributor

zobo commented Feb 28, 2021

The issue described by OP (UI not updating after clicking continue) was fixed in #367 and released with v1.14.6.

@zobo zobo closed this as completed Feb 28, 2021
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

5 participants