View Issue Details

IDProjectCategoryView StatusLast Update
0000441XdebugUncategorizedpublic2009-11-22 20:10
ReporterdevonbleakAssigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionnot fixable 
Product Version2.0.0dev 
Target VersionFixed in Version 
Summary0000441: breakpoint on switch($var) ignored
DescriptionWhen trying to set a breakpoint on switch($var), the breakpoint is ignored.

PHP version 5.2.9, Xdebug version 2.0.4

Log opened at 2009-05-17 20:04:11
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///content/test/test.php" language="PHP" protocol_version="1.0" appid="2192" idekey="netbeans-xdebug"><engine version="2.0.4"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2008 by Derick Rethans]]></copyright></init>

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

<- feature_get -i 534 -n max_data
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="534" feature_name="max_data" supported="1"><![CDATA[1024]]></response>

<- breakpoint_set -i 535 -t line -s enabled -f file:///content/test/test.php -n 5
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="535" state="enabled" id="21920001"></response>

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

Log closed at 2009-05-17 20:04:12

devon@linux-dev:~$ cat /content/test/test.php
<?php

$test = 'test';

switch($test)
{
        case 'test':
                echo 'test';
                break;
        case 'stet':
                echo 'stet';
                break;
}
?>

TagsNo tags attached.
Operating System
PHP Version5.2.8

Activities

devonbleak

2009-05-17 21:22

reporter   ~0000958

breakpoint *does* work in the following cases (assume all variables are defined correctly):

array offset:
switch($test['test'])

object member:
switch($test->test)

function return:
switch(test())

constant:
switch(TEST)

derick

2009-11-22 20:10

administrator   ~0001168

Not much I can do about it. PHP simply doesn't see any code on that line 5:

filename: /home/httpd/html/test/xdebug/bug441.php
function name: (null)
number of ops: 21
compiled vars: !0 = $test
line # op fetch ext return operands
-------------------------------------------------------------------------------
   3 0 EXT_STMT
         1 ASSIGN !0, 'test'
   5 2 NOP
   7 3 EXT_STMT
         4 CASE 0000002:0000001 !0, 'test'
         5 JMPZ 0000002:0000001, ->11
   8 6 EXT_STMT
         7 ECHO 'test'
   9 8 EXT_STMT
         9 BRK 1
  10 10* JMP ->14
        11 EXT_STMT
        12 CASE 0000002:0000001 !0, 'stet'
        13 JMPZ 0000002:0000001, ->19
  11 14 EXT_STMT
        15 ECHO 'stet'
  12 16 EXT_STMT
        17 BRK 1
  13 18* JMP ->19
  15 19 EXT_STMT
        20 RETURN

Issue History

Date Modified Username Field Change
2009-05-17 21:08 devonbleak New Issue
2009-05-17 21:08 devonbleak PHP Version => 5.2.8
2009-05-17 21:08 devonbleak Xdebug Version => 2.0.4-dev
2009-05-17 21:22 devonbleak Note Added: 0000958
2009-11-22 20:10 derick Note Added: 0001168
2009-11-22 20:10 derick Status new => resolved
2009-11-22 20:10 derick Resolution open => not fixable
2009-11-22 20:10 derick Assigned To => derick
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized