PHPDBG

About me

  • I'm Tien
  • I'm a PHP/Drupal developer
  • I'm working at GO1

Layout

  • How to install
  • Some commands
  • Demo

How to install?

Here is the link

b 123

Set break point at line 123 of current file.

b my_function

Set break point at function my_function

b test.php:10

Set break point at line 10 of test.php . We can set the path to that file: /path/to/src/NameSpace/Class.php:40 . More stable

b \A\B::c

Set break point on entry to \A\B::c Not stable now.

b d 4

Delete break point #4

b if $a > 10

Set break point with condition. Not work right now.

l function

Show code of function to terminal

l c A\B\Class

Show code of class to terminal

info vars

Show all available variables

info classes

Show all loaded classes.

info break

Show all break points

info files

Show all included files

ev $var

Show value of a variable

ev $var = 'val'

Assign value to a variable

continue

Continue execution to next break point

run

Execute the code, until we meet a break point.

finish

Execute to end

Title Text

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin urna odio, aliquam vulputate faucibus id, elementum lobortis felis. Mauris urna dolor, placerat ac sagittis quis.

s

Step

q

Quit phpdbg

back

Show current backtrace

w $var

Set a watch point on a variable. Only work if the variable is defined. The variable will be showed if it is assigned to other value, or it is removed.

References

phpdbg

By Tiến Võ Xuân