weixin_39737636
weixin_39737636
2020-12-27 07:34

stop working on vscode 1.2

After update vs code to version 1.2

Debug stops to work after the first break point step over. It does not crash/stop and no message is displayed but the indicator of current execution statement on code editor desapear and variables from the left pane also desapear. If I stop the debug and play again, it stops on breakpoint again but same problem ocurrs after step over.

I downgraded to version 1.1 and the bug does not exists.

PHP version: 7.0.4 XDebug version: v2.4.0 Adapter version:

Your launch.json:

 json
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "port": 9000,
            "log" : true
        }
    ]
}

XDebug php.ini config:

 ini
zend_extension = D:\Tools\xampp\php\ext\php_xdebug-2.4.0-7.0-vc14.dll
xdebug.remote_autostart = "On"
xdebug.remote_enable = "On"
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_log = D:\Tools\xampp\tmp\xdebug.log

XDebug logfile (from setting xdebug.remote_log in php.ini):

 xml
Log opened at 2016-06-06 20:43:20
I: Connecting to configured address/port: 127.0.0.1:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///D:/Dev/etucujurisbackend/src/cmd.php" language="PHP" xdebug:language_version="7.0.1-dev" protocol_version="1.0" appid="8564" idekey="Herbert"><engine version="2.4.0"></engine><author></author><url></url><copyright></copyright></init>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="max_depth" success="1"></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_children" success="1"></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_data" success="1"></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="4"></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="5" id="85640001"></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="6"><breakpoint type="line" filename="file:///D:/Dev/etucujurisbackend/src/cmd.php" lineno="4" state="enabled" hit_count="0" hit_value="0" id="85640001"></breakpoint></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="7"><breakpoint type="line" filename="file:///D:/Dev/etucujurisbackend/src/cmd.php" lineno="4" state="enabled" hit_count="0" hit_value="0" id="85640001"></breakpoint></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="8" status="break" reason="ok"><message filename="file:///D:/Dev/etucujurisbackend/src/cmd.php" lineno="4"></message></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="9"><stack where="{main}" level="0" type="file" filename="file:///D:/Dev/etucujurisbackend/src/cmd.php" lineno="4"></stack></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="10"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context><context name="User defined constants" id="2"></context></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="11" context="0"><property name="$var1" fullname="$var1" type="uninitialized"></property><property name="$var2" fullname="$var2" type="uninitialized"></property></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_over" transaction_id="12" status="break" reason="ok"><message filename="file:///D:/Dev/etucujurisbackend/src/cmd.php" lineno="5"></message></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="13"><stack where="{main}" level="0" type="file" filename="file:///D:/Dev/etucujurisbackend/src/cmd.php" lineno="5"></stack></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="14"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context><context name="User defined constants" id="2"></context></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="15" context="0"><property name="$var1" fullname="$var1" type="int"></property><property name="$var2" fullname="$var2" type="uninitialized"></property></response>

 <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stop" transaction_id="16" status="stopped" reason="ok"></response>

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stop" transaction_id="16" status="stopping" reason="ok"></response>

Log closed at 2016-06-06 20:44:03

Adapter logfile (from setting "log": true in launch.json):

Code snippet to reproduce:

 php

$var1 = 1;
$var2 = 2;

print $var1 + $var2;

snip_20160606174352

该提问来源于开源项目:felixfbecker/vscode-php-debug

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

  • weixin_39538962 weixin_39538962 4月前

    +1 Same problem for me with vs code v1.2 and vscode-php-debug v1.9.0

    点赞 评论 复制链接分享
  • weixin_39878989 weixin_39878989 4月前

    Very good bug report! I can reproduce, but the behaviour of the adapter seems to be correct. I will forward this to vscode repo.

    点赞 评论 复制链接分享
  • weixin_39878989 weixin_39878989 4月前

    https://github.com/Microsoft/vscode/issues/7325

    点赞 评论 复制链接分享
  • weixin_39878989 weixin_39878989 4月前

    I released an update which should fix the bug.

    点赞 评论 复制链接分享
  • weixin_39538962 weixin_39538962 4月前

    Thanks! It works now.

    点赞 评论 复制链接分享
  • weixin_39969298 weixin_39969298 4月前

    I was stuck with the same problem. Thanks for the update, now it works perfectly!

    点赞 评论 复制链接分享

相关推荐