Debugging PHP interpreter with GDB

I would like to use GDB to step though the C ++ code that makes up the php.so Apache extension. I want to see what PHP does when it runs a PHP application. I prefer using an IDE like Netbeans or Eclipse on a LAMP system.

+2


source to share


2 answers




Good luck!

+5


source


Perhaps you could do this in windows.

However, it is best to do this in a Unix window. You will have to compile everything with debugging enabled. GDB will need access to these directories for the source.



Then you will need to start apache and then start the process.

To give time for the attaché while you are pushing to PHP / Apache using your browser, add a sleep call to your PHP script. If you are using ps, you will see the process in a waiting state. Or you can just write its process id to a file in tmp before it does sleep.

0


source







All Articles