View Issue Details

IDProjectCategoryView StatusLast Update
0001518XdebugStep Debuggingpublic2021-04-09 13:36
ReporterLanaZem Assigned Toderick  
PrioritynormalSeverityfeatureReproducibilityN/A
Status assignedResolutionopen 
Product Version2.6.0beta1 
Summary0001518: Send backtraces in error notifications in same format as "stack_get" response.
DescriptionAt the moment but Xdebug doesn't send backtraces in error notifications but it will be useful to have them.

With the current implementation, Xdebug can send backtraces in the same format they are shown in output, e.g. as a list for CLI execution and as an HTML table for
Web Server execution.

Error notifications are really useful for Web Server debugging but an HTML table inside IDE console is not readable.
Steps To Reproduce1) Create PHP file;
<?php

echo $bar;

2) Start debugger session for the script;

3) Enable error notifications;
<- feature_set -i 5 -n notify_ok -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="5" feature="notify_ok" success="1"></response>

4) Resume script execution and check received error notification;
<notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" name="error">
<xdebug:message filename="file:///home/user/PhpstormProjects/xdebug_notifications/app/notify.php" lineno="3" type="Notice">
<![CDATA[Undefined variable: bar]]>
</xdebug:message>
</notify>
TagsNo tags attached.
Operating System
PHP Version7.2.0-7.2.4

Activities

LanaZem

2018-01-18 16:06

reporter  

xdebug_error_notify.log (12,067 bytes)   
Log opened at 2018-01-17 15:31:01
I: Connecting to configured address/port: localhost:9000.
W: Creating socket for 'localhost:9000', poll success, but error: Operation now in progress (29).
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/user/PhpstormProjects/xdebug_notifications/app/notify.php" language="PHP" xdebug:language_version="7.1.1" protocol_version="1.0" appid="28944" idekey="XDEBUG_ECLIPSE"><engine version="2.6.0beta2-dev"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2018 by Derick Rethans]]></copyright></init>

<- feature_set -i 1 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>

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

<- feature_set -i 3 -n max_children -v 100
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_children" success="1"></response>

<- feature_set -i 4 -n extended_properties -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="4" feature="extended_properties" success="1"></response>

<- feature_set -i 5 -n notify_ok -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="5" feature="notify_ok" success="1"></response>

<- stdout -i 6 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stdout" transaction_id="6" success="1"></response>

<- status -i 7
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="status" transaction_id="7" status="starting" reason="ok"></response>

<- step_into -i 8
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="8" status="break" reason="ok"><xdebug:message filename="file:///home/user/PhpstormProjects/xdebug_notifications/app/notify.php" lineno="3"></xdebug:message></response>

<- eval -i 9 -- aXNzZXQoJF9TRVJWRVJbJ1BIUF9JREVfQ09ORklHJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="9"><property type="bool"><![CDATA[0]]></property></response>

<- eval -i 10 -- aXNzZXQoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="10"><property type="bool"><![CDATA[1]]></property></response>

<- eval -i 11 -- KHN0cmluZykoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="11"><property type="string" size="9" encoding="base64"><![CDATA[bG9jYWxob3N0]]></property></response>

<- eval -i 12 -- KHN0cmluZykoJF9TRVJWRVJbJ1NFUlZFUl9QT1JUJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="12"><property type="string" size="4" encoding="base64"><![CDATA[ODA4MQ==]]></property></response>

<- eval -i 13 -- KHN0cmluZykoJF9TRVJWRVJbJ1JFUVVFU1RfVVJJJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="13"><property type="string" size="15" encoding="base64"><![CDATA[L2FwcC9ub3RpZnkucGhw]]></property></response>

<- breakpoint_set -i 14 -t line -f file:///home/user/PhpstormProjects/xdebug_notifications/app/stdout.php -n 9
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="14" id="289440001"></response>

<- breakpoint_set -i 15 -t line -f file:///home/user/PhpstormProjects/xdebug_notifications/app/test.php -n 27
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="15" id="289440002"></response>

<- breakpoint_set -i 16 -t line -f file:///home/user/PhpstormProjects/xdebug_notifications/app/test.php -n 9
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="16" id="289440003"></response>

<- stack_get -i 17
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="17"><stack where="{main}" level="0" type="file" filename="file:///home/user/PhpstormProjects/xdebug_notifications/app/notify.php" lineno="3"></stack></response>

<- stack_get -i 18
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="18"><stack where="{main}" level="0" type="file" filename="file:///home/user/PhpstormProjects/xdebug_notifications/app/notify.php" lineno="3"></stack></response>

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

<- context_get -i 20 -d 0 -c 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="20" context="0"><property name="$bar" fullname="$bar" type="uninitialized"></property></response>

<- context_get -i 21 -d 0 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="21" context="1"><property name="$_COOKIE" fullname="$_COOKIE" type="array" children="1" numchildren="2" page="0" pagesize="100"><property name="Phpstorm-935f96a6" fullname="$_COOKIE[&quot;Phpstorm-935f96a6&quot;]" type="string" size="36" encoding="base64"><![CDATA[NjhkZjU5NzEtZmQ2My00NmE3LTlmOWQtZTU1MDU1Y2MyYWVm]]></property><property name="XDEBUG_SESSION" fullname="$_COOKIE[&quot;XDEBUG_SESSION&quot;]" type="string" size="14" encoding="base64"><![CDATA[WERFQlVHX0VDTElQU0U=]]></property></property><property name="$_ENV" fullname="$_ENV" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_FILES" fullname="$_FILES" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_GET" fullname="$_GET" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_POST" fullname="$_POST" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_REQUEST" fullname="$_REQUEST" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_SERVER" fullname="$_SERVER" type="array" children="1" numchildren="23" page="0" pagesize="100"><property name="DOCUMENT_ROOT" fullname="$_SERVER[&quot;DOCUMENT_ROOT&quot;]" type="string" size="48" encoding="base64"><![CDATA[L2hvbWUvdXNlci9QaHBzdG9ybVByb2plY3RzL3hkZWJ1Z19ub3RpZmljYXRpb25z]]></property><property name="REMOTE_ADDR" fullname="$_SERVER[&quot;REMOTE_ADDR&quot;]" type="string" size="3" encoding="base64"><![CDATA[Ojox]]></property><property name="REMOTE_PORT" fullname="$_SERVER[&quot;REMOTE_PORT&quot;]" type="string" size="5" encoding="base64"><![CDATA[NTc3MzI=]]></property><property name="SERVER_SOFTWARE" fullname="$_SERVER[&quot;SERVER_SOFTWARE&quot;]" type="string" size="28" encoding="base64"><![CDATA[UEhQIDcuMS4xIERldmVsb3BtZW50IFNlcnZlcg==]]></property><property name="SERVER_PROTOCOL" fullname="$_SERVER[&quot;SERVER_PROTOCOL&quot;]" type="string" size="8" encoding="base64"><![CDATA[SFRUUC8xLjE=]]></property><property name="SERVER_NAME" fullname="$_SERVER[&quot;SERVER_NAME&quot;]" type="string" size="9" encoding="base64"><![CDATA[bG9jYWxob3N0]]></property><property name="SERVER_PORT" fullname="$_SERVER[&quot;SERVER_PORT&quot;]" type="string" size="4" encoding="base64"><![CDATA[ODA4MQ==]]></property><property name="REQUEST_URI" fullname="$_SERVER[&quot;REQUEST_URI&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9ub3RpZnkucGhw]]></property><property name="REQUEST_METHOD" fullname="$_SERVER[&quot;REQUEST_METHOD&quot;]" type="string" size="3" encoding="base64"><![CDATA[R0VU]]></property><property name="SCRIPT_NAME" fullname="$_SERVER[&quot;SCRIPT_NAME&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9ub3RpZnkucGhw]]></property><property name="SCRIPT_FILENAME" fullname="$_SERVER[&quot;SCRIPT_FILENAME&quot;]" type="string" size="63" encoding="base64"><![CDATA[L2hvbWUvdXNlci9QaHBzdG9ybVByb2plY3RzL3hkZWJ1Z19ub3RpZmljYXRpb25zL2FwcC9ub3RpZnkucGhw]]></property><property name="PHP_SELF" fullname="$_SERVER[&quot;PHP_SELF&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9ub3RpZnkucGhw]]></property><property name="HTTP_HOST" fullname="$_SERVER[&quot;HTTP_HOST&quot;]" type="string" size="14" encoding="base64"><![CDATA[bG9jYWxob3N0OjgwODE=]]></property><property name="HTTP_CONNECTION" fullname="$_SERVER[&quot;HTTP_CONNECTION&quot;]" type="string" size="10" encoding="base64"><![CDATA[a2VlcC1hbGl2ZQ==]]></property><property name="HTTP_CACHE_CONTROL" fullname="$_SERVER[&quot;HTTP_CACHE_CONTROL&quot;]" type="string" size="9" encoding="base64"><![CDATA[bWF4LWFnZT0w]]></property><property name="HTTP_UPGRADE_INSECURE_REQUESTS" fullname="$_SERVER[&quot;HTTP_UPGRADE_INSECURE_REQUESTS&quot;]" type="string" size="1" encoding="base64"><![CDATA[MQ==]]></property><property name="HTTP_USER_AGENT" fullname="$_SERVER[&quot;HTTP_USER_AGENT&quot;]" type="string" size="104" encoding="base64"><![CDATA[TW96aWxsYS81LjAgKFgxMTsgTGludXggeDg2XzY0KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvNTYuMC4yOTI0Ljc2IFNhZmFyaS81MzcuMzY=]]></property><property name="HTTP_ACCEPT" fullname="$_SERVER[&quot;HTTP_ACCEPT&quot;]" type="string" size="74" encoding="base64"><![CDATA[dGV4dC9odG1sLGFwcGxpY2F0aW9uL3hodG1sK3htbCxhcHBsaWNhdGlvbi94bWw7cT0wLjksaW1hZ2Uvd2VicCwqLyo7cT0wLjg=]]></property><property name="HTTP_ACCEPT_ENCODING" fullname="$_SERVER[&quot;HTTP_ACCEPT_ENCODING&quot;]" type="string" size="23" encoding="base64"><![CDATA[Z3ppcCwgZGVmbGF0ZSwgc2RjaCwgYnI=]]></property><property name="HTTP_ACCEPT_LANGUAGE" fullname="$_SERVER[&quot;HTTP_ACCEPT_LANGUAGE&quot;]" type="string" size="41" encoding="base64"><![CDATA[ZW4tVVMsZW47cT0wLjgsZXM7cT0wLjYsZnI7cT0wLjQscnU7cT0wLjI=]]></property><property name="HTTP_COOKIE" fullname="$_SERVER[&quot;HTTP_COOKIE&quot;]" type="string" size="85" encoding="base64"><![CDATA[UGhwc3Rvcm0tOTM1Zjk2YTY9NjhkZjU5NzEtZmQ2My00NmE3LTlmOWQtZTU1MDU1Y2MyYWVmOyBYREVCVUdfU0VTU0lPTj1YREVCVUdfRUNMSVBTRQ==]]></property><property name="REQUEST_TIME_FLOAT" fullname="$_SERVER[&quot;REQUEST_TIME_FLOAT&quot;]" type="float"><![CDATA[1516203061.1895]]></property><property name="REQUEST_TIME" fullname="$_SERVER[&quot;REQUEST_TIME&quot;]" type="int"><![CDATA[1516203061]]></property></property></response>

<- context_get -i 22 -d 0 -c 2
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="22" context="2"></response>

<- run -i 23
-> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///home/user/PhpstormProjects/xdebug_notifications/app/notify.php" lineno="3" type_string="Notice"><![CDATA[Undefined variable: bar]]></xdebug:message></notify>

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

<- run -i 24
Log closed at 2018-01-17 15:31:03

xdebug_error_notify.log (12,067 bytes)   

derick

2021-03-17 09:29

administrator   ~0005750

Is this issue still relevant to you? I think we might have dropped the ball on this.

LanaZem

2021-04-09 13:36

reporter   ~0005823

Since the notifications release, we didn't have any incoming requests for this feature. So I'd say we can shelve this request and get back to it if situation changes.

Issue History

Date Modified Username Field Change
2018-01-18 16:06 LanaZem New Issue
2018-01-18 16:06 LanaZem File Added: xdebug_error_notify.log
2018-01-19 11:05 derick Status new => acknowledged
2018-01-19 11:05 derick Target Version => 2.7.0dev
2018-01-19 11:05 derick Summary Send backtraces in error notifications not wrapped in html => Send backtraces in error notifications in same format as "stack_get" response.
2019-01-22 21:56 derick Target Version 2.7.0dev =>
2020-03-12 16:23 derick Severity minor => feature
2020-03-12 16:28 derick Category Feature/Change request => Remote Debugging
2020-03-12 16:33 derick Category Remote Debugging => Step Debugging
2021-03-17 09:29 derick Assigned To => derick
2021-03-17 09:29 derick Status acknowledged => feedback
2021-03-17 09:29 derick Note Added: 0005750
2021-04-09 13:36 LanaZem Note Added: 0005823
2021-04-09 13:36 LanaZem Status feedback => assigned