> For the complete documentation index, see [llms.txt](https://xoops.gitbook.io/xoops-2-5-x-debugging-with-firephp-firebug/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xoops.gitbook.io/xoops-2-5-x-debugging-with-firephp-firebug/php-debugging-without-xoops.md).

# PHP Debugging without XOOPS

## 3.1     History

Frankblack was frustrated with debugging his AJAX applications using just the standard Debug Mode, therefore he ended up using FireBug + FirePHP as addons for Firefox, and he rewrote XOOPS class/logger/render.php to output the XOOPS debug messages to FirePHP, resulting in a very flexible solution. Trabis contributed as well, and now we have a solution that is very helpful to XOOPS Developers.

## 3.2     Installation

Important – you have to have Firefox to use Firebug and FirePHP! Recommended: Ver. 4.0

There are few simple steps to get you going:

1. Download and install in Firefox the newest version of Firebug (currently 1.7) from here: <http://getfirebug.com/>
2. Download and install in Firefox the latest version of FirePHP extension:&#x20;

   <https://addons.mozilla.org/en-US/firefox/addon/firephp/>
3. Download and install the FireDebug 1.6 for XOOPS 2.5.x
4. Go to xoops\_data/configs/xoopsconfig.php and change the DebugLogger configuration to:

```php
    /**#@+
     * Debug logger for XOOPS
     *
     * <ul>Choose logger to use
     *  <li> legacy </li>
     *  <li> pqp </li>
     *  <li> firephp </li>
     * </ul>
     */
    "debugLogger" => firephp,
    /**#@-*/
```

and you’re ready to go.

## 3.3     Using FirePHP/Firebug with XOOPS

After installing the above tools, you can add this line your PHP file:

```php
require_once XOOPS_ROOT_PATH.'/class/logger/firephp/FirePHPCore/fb.php';
```

and you can start sending messages to FirePHP:

```php
FB::log('Log message');
FB::info('Info message');
FB::warn('Warn message');
FB::error('Error message');
FB::trace('Trace message');
```

![Untitled-1.jpg](/files/-LD6N2iJ4CnfsN77ocWr)

**Figure 7: Firebug with FirePHP and XOOPS debug messages**

The messages from XOOPS are coming from XOOPS Debug, but XOOPS just redirects them to Firebug, so you have all debug messages conveniently in one location.

![Untitled-1.jpg](/files/-LD6N2iNtWq6_wLys__w)

**Figure 8: XOOPS Debug messages in XOOPS**

![Untitled-1.jpg](/files/-LD6N2iSNX7AX72Yrc6j)

**Figure 9: XOOPS Debug messages in Firebug**

Additional advantage is that you also have Smarty Debug Output as well – all in one location. When we want to see values of variables, we can send it as well, e.g.

```php
FB::log($index_admin,'this is our ModuleAdmin class');
```

This will show in Firebug as:

![Untitled-1.jpg](/files/-LD6N2iW_GKbEINE8WlR)

Since there is more information than the line can hold, we can just click on that line and a new window will open with all the details:

![Untitled-1.jpg](/files/-LD6N2iY2POkbdRsJ1H7)

**Figure 10: Firebug with detailed FirePHP variable info**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://xoops.gitbook.io/xoops-2-5-x-debugging-with-firephp-firebug/php-debugging-without-xoops.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
