Skip to content

Interface is not updated after continuing execution #150

Description

@scottsb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions