1
karedokx
debuging in xoops/php
  • 2005/4/17 13:41

  • karedokx

  • Quite a regular

  • Posts: 319

  • Since: 2004/7/1 6


i'm in the process of learning to code in php for xoops.. at least to achieve a level where i can contribute in resolving some bugs i found in the code

can you guys give me a tips/help, how can i do a debug? what kind of program can i use to debug XOOPS php code?

i want to follow a field value (why it's returned a wrong value, for example), how do you guys usually do that?

thanks in advance..

2
Dave_L
Re: debuging in xoops/php
  • 2005/4/17 16:34

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Some PHP utilities that I use for debugging:

error_reporting - Calling error_reporting(E_ALL) is the same as turning on XOOPS' PHP debug, but you can place it specifically where you need it.

var_dump - Prints out any kind of variable, including arrays and objects.

debug_backtrace - Generates a backtrace. Very useful for telling what sequence of function calls got you to a particular location in the code.

error_log - Quick and easy way of logging debug info to a file.

trigger_error - Generates a user-level error/warning/notice message.

Output Control Functions - Useful for buffering debug info, such as from var_dump or debug_backtrace, for output to a log file.

Debugging an application such as XOOPS requires becoming familiar with the flow of control through the various scripts. You also need to understand how HTML forms work, how Smarty templates are handled, and be familiar with MySQL. You might want to pick something specific, and trace it all the way through to see how it's processed. The above functions can help with this.

-----

What do you mean by "field value"?

Login

Who's Online

448 user(s) are online (57 user(s) are browsing Support Forums)


Members: 0


Guests: 448


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Sep 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits