开发者

php---which tool i can use to trace a cms source code

开发者 https://www.devze.com 2023-02-01 02:19 出处:网络
now, if i want to trace the drupal sourcecode.how and which tool i can use to trace the drupal source code?i want to make a quick walk-through to drupal code. and want to trace it myself,but i don\'t

now, if i want to trace the drupal sourcecode.how and which tool i can use to trace the drupal source code?i want to make a quick walk-through to drupal code. and want to trace it myself,but i don't know which good debugger 开发者_StackOverflow中文版i should use and how to trace it, thank you


xdebug is an extension to PHP.

With it, you can get a Trace file every time a page is loaded, with a full list of every function called while rendering that page.

http://www.xdebug.org/docs/execution_trace


Try Drupal for Firebug http://drupal.org/project/drupalforfirebug with firebug https://addons.mozilla.org/de/firefox/addon/1843/ as addon in firefox


A quick and dirty way to find which methods was used and what values been passed until certain moment can be archived by outputting debug_backtrace()

like:

var_dump(debug_backtrace());

There are many IDE with integrated debuggers at most they work same way, as example above. You can try Eclipse or NetBeans for free or Zend Studio for a fee.


Have you played much with the API Documentation? All of the core code is documented here, as well as providing a hyperlinked snapshot of the current HEAD for the particular major version you are browsing. One you get a good grasp of how hooks and templates work, tracing through code this way is mostly easy.

0

精彩评论

暂无评论...
验证码 换一张
取 消