forked from xdebug/xdebug
-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug xdebug#886: Use the same file system protocol for file loca…
…ted inside PHAR in both directions
- Loading branch information
Showing
5 changed files
with
80 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
$DIR = getenv("XDEBUG_TEST_DIR"); | ||
include "phar://$DIR/bug00886.phar/file1.php"; | ||
function1( "Derick" ); | ||
?> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--TEST-- | ||
Test for bug #886: Use the same file system protocol for file located inside PHAR in both directions | ||
--FILE-- | ||
<?php | ||
xdebug_start_trace( "/tmp/trace.log" ); | ||
require 'dbgp/dbgpclient.php'; | ||
|
||
$dir = dirname(__FILE__); | ||
putenv("XDEBUG_TEST_DIR=$dir"); | ||
$data = file_get_contents(dirname(__FILE__) . '/bug00886.inc'); | ||
|
||
$commands = array( | ||
'step_into', | ||
'step_into', | ||
'step_into', | ||
'stack_get', | ||
'step_into', | ||
"breakpoint_set -t line -f phar://{$dir}/bug00886.phar/file1.php -n 4", | ||
'run', | ||
"source -f phar://{$dir}/bug00886.phar/file1.php", | ||
'step_into', | ||
'stack_get', | ||
'detach', | ||
); | ||
|
||
dbgpRun( $data, $commands ); | ||
?> | ||
--EXPECTF-- | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///tmp/xdebug-dbgp-test.php" language="PHP" protocol_version="1.0" appid="" idekey=""><engine version=""><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2012 by Derick Rethans]]></copyright></init> | ||
|
||
-> step_into -i 1 | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="1" status="break" reason="ok"><xdebug:message filename="file:///tmp/xdebug-dbgp-test.php" lineno="2"></xdebug:message></response> | ||
|
||
-> step_into -i 2 | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="2" status="break" reason="ok"><xdebug:message filename="file:///tmp/xdebug-dbgp-test.php" lineno="3"></xdebug:message></response> | ||
|
||
-> step_into -i 3 | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="3" status="break" reason="ok"><xdebug:message filename="phar://%s/tests/bug00886.phar/file1.php" lineno="2"></xdebug:message></response> | ||
|
||
-> stack_get -i 4 | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="4"><stack where="include" level="0" type="file" filename="phar://%s/tests/bug00886.phar/file1.php" lineno="2"></stack><stack where="{main}" level="1" type="file" filename="file:///tmp/xdebug-dbgp-test.php" lineno="3"></stack></response> | ||
|
||
-> step_into -i 5 | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="5" status="break" reason="ok"><xdebug:message filename="phar://%s/tests/bug00886.phar/file2.php" lineno="2"></xdebug:message></response> | ||
|
||
-> breakpoint_set -i 6 -t line -f phar://%s/tests/bug00886.phar/file1.php -n 4 | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" id=""></response> | ||
|
||
-> run -i 7 | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<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="phar://%s/tests/bug00886.phar/file1.php" lineno="4"></xdebug:message></response> | ||
|
||
-> source -i 8 -f phar://%s/tests/bug00886.phar/file1.php | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="source" transaction_id="8" encoding="base64"><![CDATA[PD9waHAKaW5jbHVkZSAnZmlsZTIucGhwJzsKCmZ1bmN0aW9uIGZ1bmN0aW9uMSggJGZvbyApCnsKCWVjaG8gc3RybGVuKCAkZm9vICksICJcbiI7CglmdW5jdGlvbjIoICRmb28gKTsKfQo/Pgo=]]></response> | ||
|
||
-> step_into -i 9 | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="9" status="break" reason="ok"><xdebug:message filename="phar://%s/tests/bug00886.phar/file1.php" lineno="10"></xdebug:message></response> | ||
|
||
-> stack_get -i 10 | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="10"><stack where="include" level="0" type="file" filename="phar://%s/tests/bug00886.phar/file1.php" lineno="10"></stack><stack where="{main}" level="1" type="file" filename="file:///tmp/xdebug-dbgp-test.php" lineno="3"></stack></response> | ||
|
||
-> detach -i 11 | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="detach" transaction_id="11" status="stopping" reason="ok"></response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters