0

I m starting developping a php extension based on C and the zend Api.

I m looking for a debugger which I can use for this.

I found a extension called 'Zend Debugger' but I m not sure if it's related to debugging php codes of web apps or related to debugging c code of php extensions.

Any informations about this will help me a lot.

Thanks for you help.

  • 1
    Zend Debugger is for PHP code / opcodes for sure. For extension code you need your favorite 'real' debugger, e.g. I'm using gdb with ddd as GUI frontend on Linux for this ... – Hartmut Holzgraefe Dec 11 '14 at 13:07
  • Thank you for your reply. As I understand there is no specific debugger for developping php extension's, but we can use the standard debugger on linux which is gdb –  Dec 11 '14 at 14:18

1 Answers1

1

I use gdb to debug PHP extension. You can set breakpoint by function name, gdb will show you something like this because PHP extensions are loaded by dlopen. Press y, then run:

Function "foo" not defined.
Make breakpoint pending on future shared library load? (y or [n]) 
D3Hunter
  • 1,329
  • 10
  • 21
  • As I understand there is no specific debugger for developping php extension's, but we can use the standard debugger on linux which is gdb –  Dec 11 '14 at 14:20