4234 shaares
2 results
tagged
gdb
First, install PHP debugging extensions for gdb
, for example:
debuginfo-install php-5.6.8 # if you use yum
aptitude install php5-dbg # if you use aptitude
Then simply:
php_version=5.6.8
php_script_pid=$(pgrep -f $php_script_name)
curl https://raw.githubusercontent.com/php/php-src/PHP-$php_version/.gdbinit >> ~/.gdbinit
gdb …
This post aims to introduce a very useful tool to debug low-level issues in Python, how to enhance it and finally how to solve two annoying common problems.
1. Debugging Python with gdb
All the basics are there : https://wiki.python.org/moin/DebuggingWithGdb
Tl;dr :
gdb -p $(pgrep -f …