| Summary: | Step over (F6) problem without braces | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Fabio Z <znt.fabio> |
| Component: | PDT | Assignee: | Michael Spector <spektom> |
| Status: | CLOSED WONTFIX | QA Contact: | Sylvia Tancheva <silviya> |
| Severity: | major | ||
| Priority: | P2 | CC: | assaf.almaz, gadi, vadim.p, zulus |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
this bug could have its root cause in the Zend Debugger binary The root cause is the Zend Debugger binary which does not recognize correctly statements such as if, for that don't have open brackets {
Still relevant - changing version to 2.0.0
In addition:
If you use the code:
<?php
class MyClass
{
public function Foo2($value)
{
if ($value)
return true;
else
return false;
}
}
$obj = new MyClass();
echo($obj->Foo2(false));
?>
Put a breakpoint on the else -> debugger would not stop at all (breakpoint is totally ignored)
Putting braces around the return false; makes it stop on the return statement.
[Sylvia Tancheva]
Raising priority Tested on 2.2.1SR1. Still relevant, moving to 2.2.0M1 Problem is in Zend Debugger only. It also was abandoned. |
Build ID: I20070517-1700 Steps To Reproduce: 1. Write this code <?php class MyClass { public function Foo($value) { if ($value == true) return true; else return false; } public function Foo2($value) { if ($value) return true; else return false; } } $obj = new MyClass(); echo($obj->Foo(true)); echo($obj->Foo2(true)); ?> 2. Put a breakpoint on the line if ($value == true) of function Foo() 3. Run the debug, when it stop on the breakpoint press F6 (step over) I'm expecting that the debug goes on the line return true; but if braces are missing it skip the line. With if ($value == true) { return true; } all works. --- Another bug: 4. Put a breakpoint on the line if ($value) of function Foo2() 3. Run the debug, when it stop on the breakpoint press F6 (step over) Here the debug never stops on the breakpoint, with or without braces. If I evaluate the if it works as described for function Foo(): if ($value == true) More information: