5e215dbca2
The code to print out the result of the expression following the = command has moved from inside the resulting eval block, to outside it in the debugger code itself. Hence, if the eval block fails, the value of $_ now prints out and this is confusion because it is the value that a previous = command put in there. With this change the eval block first unsets $_, so that the subsequent print value code will do nothing in the case of a failure. Differential Revision: D944120
39 linhas
810 B
Plaintext
39 linhas
810 B
Plaintext
Program %s/eval2.php loaded. Type '[r]un' or '[c]ontinue' to go.
|
|
b foo()
|
|
Breakpoint 1 set upon entering foo()
|
|
But wont break until function foo has been loaded.
|
|
c
|
|
Program %s/eval2.php exited normally.
|
|
@ foo(1)
|
|
Breakpoint 1 reached at foo() on line 3 of %s/eval2.php
|
|
2 function foo($x) {
|
|
3 return $x + 1;
|
|
4 }
|
|
|
|
= $x
|
|
1
|
|
c
|
|
= $x
|
|
HipHop Notice: Undefined variable: x
|
|
null
|
|
$_ = "don't want to see this"
|
|
= throwSomething()
|
|
Hit a php exception : exception 'Exception' with message 'don't want to see this' in %s/eval2.php:8
|
|
Stack trace:
|
|
#0 (1): throwSomething()
|
|
#1 (1): include()
|
|
#2 {main}
|
|
p $_
|
|
"don't want to see this"
|
|
= bad syntax
|
|
Hit fatal : syntax error, unexpected T_STRING
|
|
#0 at [:1]
|
|
#1 include(), called at [:1]
|
|
|
|
= printSomething()
|
|
don't want to see this
|
|
"also returned something"
|
|
|
|
|
|
quit
|