View Issue Details

IDProjectCategoryView StatusLast Update
0000990XdebugStep Debuggingpublic2020-03-12 16:43
Reporteraik099 Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.2.3 
Target Version2.6.0Fixed in Version2.6.0alpha1 
Summary0000990: DBGp: Add notifications for notices and warnings
Description

I'm using PHPStorm 6.0.3 to debug an application.

There I have following code:

$a = 5;
$x = in_array('x', $a);

This would surely get me a notice/warning, that $a isn't an array. However with XDebug I'm not seeing any errors in PHPStorm console.

Additional Information

I really don't know if XDebug provides such info at all during debugging, or just only prints all traces after script has finished.

With Zend Debugger I was able to see every error in console.

Related PHPStorm issue: http://youtrack.jetbrains.com/issue/WI-13369

TagsNo tags attached.
Operating System
PHP Version5.4.10-5.4.14

Activities

aik099

2013-10-23 12:40

reporter   ~0002595

After talking with guys from PhpStorm it appears, that XDebug might not be providing such info at all. So if a line of code gets executed during step-by-step debugging and it produces an error (or several) in a result, then nothing is returned by xdebug to show that in Console.

Zend Debugger somehow managed to implement this and this is very helpful to see an error happening real time after it happens during debugger.

derick

2016-12-13 21:27

administrator   ~0004047

I've added the following to the PhpStorm issue. I don't think we need to add this though, as PhpStorm allows Notice/Warning breakpoints, that do the same thing now.

Dear PhpStorm developers, and in specific @Svetlana.Zemlyanskaya - is this something you find interesting to add to PhpStorm? In the debugging protocol, I would have to add a new [notification|https://xdebug.org/docs-dbgp.php#notifications], for example:

{code}
<notification xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" name="debug">
<xdebug:type>Warning</xdebug:type>
<xdebug:location
filename="file:///C:/Users/Nikolay.Matveev/Test/phpstorm/script_debug_test/wi5927.php"
lineno="2"/>
<xdebug:message><![CDATA[Undefined variable $x]]></xdebug:message>
</notification>
{code}

Of course, this is already sort of possible to achieve by setting a Notice or Warning breakpoint. I think PhpStorm already does this by default, which makes this feature moot...

aik099

2016-12-13 22:23

reporter   ~0004062

I was aware of Notice/Warning breakpoints, but they aren't much useful, because:

  1. you can't define them globally and have to specify them in each project you open
  2. no actual notice/warning message is shown and therefore I have to guess what might have gone wrong

derick

2016-12-15 12:06

administrator   ~0004075

OK, I've added a comment to https://youtrack.jetbrains.com/issue/WI-13369 too.

derick

2017-01-04 12:06

administrator   ~0004156

I have written to the DBGp development list with an RFC for the addition to the specification: https://xdebug.org/archives/xdebug-dev/2641.html

A preliminary Xdebug implementation is in a PR at https://github.com/xdebug/xdebug/pull/310

derick

2017-11-18 13:49

administrator   ~0004469

Fixed in GIT - thanks for playing! :-)

Issue History

Date Modified Username Field Change
2013-10-23 09:22 aik099 New Issue
2013-10-23 12:40 aik099 Note Added: 0002595
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)
2016-12-13 21:27 derick Note Added: 0004047
2016-12-13 21:27 derick Category (No Category) => Feature/Change request
2016-12-13 21:28 derick Assigned To => derick
2016-12-13 21:28 derick Status new => acknowledged
2016-12-13 22:23 aik099 Note Added: 0004062
2016-12-15 12:06 derick Note Added: 0004075
2016-12-21 17:50 derick Summary Errors during debugging are not displayed => DBGp: Add notifications for notices and warnings through DBGp notifications
2016-12-21 17:51 derick Summary DBGp: Add notifications for notices and warnings through DBGp notifications => DBGp: Add notifications for notices and warnings
2017-01-04 12:06 derick Note Added: 0004156
2017-01-04 12:06 derick Target Version => 2.6.0dev
2017-11-18 13:49 derick Note Added: 0004469
2017-11-18 13:49 derick Status acknowledged => closed
2017-11-18 13:49 derick Resolution open => fixed
2017-11-18 13:49 derick Fixed in Version => 2.6.0dev
2017-12-02 15:57 derick Fixed in Version 2.6.0dev => 2.6.0alpha1
2017-12-02 18:34 derick Target Version 2.6.0dev => 2.6.0alpha1
2017-12-02 18:36 derick Target Version 2.6.0alpha1 => 2.6.0
2020-03-12 16:43 derick Category Feature/Change request => Step Debugging