Printf("%Y: PHP function-entry:\t%s%s%s() in %s:%d\n", walltimestamp, copyinstr(arg3), copyinstr(arg4), copyinstr(arg0), basename(copyinstr(arg1)), (int)arg2) Printf("%Y: PHP execute-return:\t%s:%d\n", walltimestamp, basename(copyinstr(arg0)), (int)arg1) Printf("%Y: PHP execute-entry:\t%s:%d\n", walltimestamp, basename(copyinstr(arg0)), (int)arg1) Printf("%Y: PHP exception-thrown:\t%s\n", walltimestamp, copyinstr(arg0)) Printf("%Y: PHP exception-caught:\t%s\n", walltimestamp, copyinstr(arg0)) Printf("%Y: PHP error message:\t%s in %s:%d\n", walltimestamp, copyinstr(arg0), basename(copyinstr(arg1)), (int)arg2) Printf("%Y: PHP compile-file-return:\t%s (%s)\n", walltimestamp, basename(copyinstr(arg0)), basename(copyinstr(arg1))) ![]() Printf("%Y: PHP compile-file-entry:\t%s (%s)\n", walltimestamp, basename(copyinstr(arg0)), copyinstr(arg1)) Here is more advanced dtrace script, just save it into dtruss-php.d, make it executable ( chmod +x dtruss-php.d) and run: #!/usr/sbin/dtrace -Zs You may trace your script with easy to remember alias: trace-php. If your system supports DTrace dynamic tracing (installed by default on OS X) and your PHP is compiled with the DTrace probes enabled ( -enable-dtrace) which should be by default, this command can help you to debug PHP script with no time: sudo dtrace -qn 'php*:::function-entry "'
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |