|
| 1 | +--TEST-- |
| 2 | +Test for bug #2326: Step debugger finishes if property debugging handler in PHP throws an exception (>= PHP 8.4) |
| 3 | +--SKIPIF-- |
| 4 | +<?php |
| 5 | +require __DIR__ . '/../utils.inc'; |
| 6 | +check_reqs('PHP >= 8.4; dbgp'); |
| 7 | +?> |
| 8 | +--EXTENSIONS-- |
| 9 | +dom |
| 10 | +xmlreader |
| 11 | +--FILE-- |
| 12 | +<?php |
| 13 | +require 'dbgp/dbgpclient.php'; |
| 14 | +$filename = dirname(__FILE__) . '/bug02326.inc'; |
| 15 | + |
| 16 | +$commands = array( |
| 17 | + 'step_into', |
| 18 | + 'stdout -c 1', |
| 19 | + 'breakpoint_set -t line -n 12', |
| 20 | + 'run', |
| 21 | + 'context_get -c 0', |
| 22 | + 'step_over', |
| 23 | + 'context_get -c 0', |
| 24 | + 'step_into', |
| 25 | + 'context_get -c 0', |
| 26 | + 'step_into', |
| 27 | + 'detach', |
| 28 | +); |
| 29 | + |
| 30 | +dbgpRunFile( $filename, $commands, [ 'extension' => [ 'dom', 'xmlreader' ] ] ); |
| 31 | +?> |
| 32 | +--EXPECTF-- |
| 33 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 34 | +<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file://bug02326.inc" language="PHP" xdebug:language_version="" protocol_version="1.0" appid=""><engine version=""><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2099 by Derick Rethans]]></copyright></init> |
| 35 | + |
| 36 | +-> step_into -i 1 |
| 37 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 38 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="1" status="break" reason="ok"><xdebug:message filename="file://bug02326.inc" lineno="2"></xdebug:message></response> |
| 39 | + |
| 40 | +-> stdout -i 2 -c 1 |
| 41 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 42 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stdout" transaction_id="2" success="1"></response> |
| 43 | + |
| 44 | +-> breakpoint_set -i 3 -t line -n 12 |
| 45 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 46 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="3" id="{{PID}}0001"></response> |
| 47 | + |
| 48 | +-> run -i 4 |
| 49 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 50 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="4" status="break" reason="ok"><xdebug:message filename="file://bug02326.inc" lineno="12"></xdebug:message></response> |
| 51 | + |
| 52 | +-> context_get -i 5 -c 0 |
| 53 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 54 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="5" context="0"><property name="$err" fullname="$err" type="uninitialized"></property><property name="$reader" fullname="$reader" type="null"></property></response> |
| 55 | + |
| 56 | +-> step_over -i 6 |
| 57 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 58 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_over" transaction_id="6" status="break" reason="ok"><xdebug:message filename="file://bug02326.inc" lineno="13"></xdebug:message></response> |
| 59 | + |
| 60 | +-> context_get -i 7 -c 0 |
| 61 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 62 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="7" context="0"><property name="$err" fullname="$err" type="bool"><![CDATA[1]]></property><property name="$reader" fullname="$reader" type="object" classname="XMLReader" children="1" numchildren="13" page="0" pagesize="32"><property name="attributeCount" fullname="$reader->attributeCount" facet="public" type="int"><![CDATA[0]]></property><property name="baseURI" fullname="$reader->baseURI" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="depth" fullname="$reader->depth" facet="public" type="int"><![CDATA[0]]></property><property name="hasAttributes" fullname="$reader->hasAttributes" facet="public" type="bool"><![CDATA[0]]></property><property name="hasValue" fullname="$reader->hasValue" facet="public" type="bool"><![CDATA[0]]></property><property name="isDefault" fullname="$reader->isDefault" facet="public" type="bool"><![CDATA[0]]></property><property name="localName" fullname="$reader->localName" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="name" fullname="$reader->name" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="namespaceURI" fullname="$reader->namespaceURI" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="nodeType" fullname="$reader->nodeType" facet="public" type="int"><![CDATA[0]]></property><property name="prefix" fullname="$reader->prefix" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="value" fullname="$reader->value" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="xmlLang" fullname="$reader->xmlLang" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property></property></response> |
| 63 | + |
| 64 | +-> step_into -i 8 |
| 65 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 66 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="8" status="break" reason="ok"><xdebug:message filename="file://bug02326.inc" lineno="17"></xdebug:message></response> |
| 67 | + |
| 68 | +-> context_get -i 9 -c 0 |
| 69 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 70 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="9" context="0"><property name="$err" fullname="$err" type="bool"><![CDATA[1]]></property><property name="$reader" fullname="$reader" type="object" classname="XMLReader" children="1" numchildren="13" page="0" pagesize="32"><property name="attributeCount" fullname="$reader->attributeCount" facet="public" type="int"><![CDATA[0]]></property><property name="baseURI" fullname="$reader->baseURI" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="depth" fullname="$reader->depth" facet="public" type="int"><![CDATA[0]]></property><property name="hasAttributes" fullname="$reader->hasAttributes" facet="public" type="bool"><![CDATA[0]]></property><property name="hasValue" fullname="$reader->hasValue" facet="public" type="bool"><![CDATA[0]]></property><property name="isDefault" fullname="$reader->isDefault" facet="public" type="bool"><![CDATA[0]]></property><property name="localName" fullname="$reader->localName" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="name" fullname="$reader->name" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="namespaceURI" fullname="$reader->namespaceURI" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="nodeType" fullname="$reader->nodeType" facet="public" type="int"><![CDATA[0]]></property><property name="prefix" fullname="$reader->prefix" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="value" fullname="$reader->value" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="xmlLang" fullname="$reader->xmlLang" facet="public" type="string" size="0" encoding="base64"><![CDATA[]]></property></property></response> |
| 71 | + |
| 72 | +-> step_into -i 10 |
| 73 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 74 | +<stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[TmV4dCBsaW5lMQ==]]></stream> |
| 75 | + |
| 76 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 77 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="10" status="break" reason="ok"><xdebug:message filename="file://bug02326.inc" lineno="18"></xdebug:message></response> |
| 78 | + |
| 79 | +-> detach -i 11 |
| 80 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 81 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="detach" transaction_id="11" status="stopping" reason="ok"></response> |
0 commit comments