DBG Frequently Asked Questions
- What is Php Debugger DBG?
- How does it work?
- What are the system requirements?
- I've got an error message about incompatibility. What does it mean?
- Every time I run script in IDE I'm getting message 'Session timeout expired'
- I can not install win32 package (an MSI file). What should I do?
- I downloaded and installed Windows Installer, but I still can not install win32 package (an MSI file).
- I'm trying to use SE IDE. I just don't understand what the file mappings are.
- I'm trying to work with SE IDE. My development WEB server runs under Linux. Should I install Samba?
- I installed PHP, but every time I loaded a document, I got the message 'Document Contains No Data'! What's going on here?
- If you encounter any problem or you have some suggestions, don't hesitate to visit the DBG forum at sourceforge site.
- If you found any bug(s) in either DBG server or client part, please submit them there.
What is Php Debugger DBG?
Php Debugger DBG is a comprehensive software tool that helps you to debug your php script.
It may work with your production or development WEB server or locally without any other computers.
Generally DBG allows:
- execute scripts in step-by-step
- run (continue)
- break (stop)
- work with breakpoints which
- support conditions (to be met before breakpoint fires)
- can be temporary (to implement goto cursor)
- can be global (not at any given line/file, but simply global)
- can skip certain number of hits
- work with watch/eval
- can evaluate any given statement(s) at a time (just like eval() in php)
- can perform it at a given nested call (back-trace location) - so you can change or see any values local to function(s) where the current function was called from.
- profile scripts. Shows how many microseconds were spent for each executed line including min, max, avg values and number of hits.
How does it work?
dbg 2.04 and earlier versions support debugging in following manner:
It can be seen that there is a lot of 'Ifs'. So, if one condition isn't met, script will be executed as if no dbg was loaded at all.
Starting with dbg version 2.10, debug session can be activated only by explicit request from the client.
For this purspose there is DBGSESSID variable introduced. Ususally it is passed to the server by front-end IDE which works with DBG,
but also it can be done with HTML browser.
- The process starts when HTML browser on the client machine tries to open an URL that is actually a php script.
- Web server starts PHP Engine to perform that script.
- PHP Engine loads dbg extension and other extensions as well and starts to work.
- dbg extension intercepts script execution and when the Engine attempts to execute
the first line, dbg will try to establish debugging session with machine which address
and port values have been set in the php.ini debugger.port/debugger.host entries. If debugger.host
entry is "clienthost" (preserved keyword), dbg will automatically detect an address of the client host. If the dbg
listener was executed, new debugging session starts at this point.
Beside the other features, dbg 2.10 supports CGI mode debugging which doesn't require any HTML browser or HTTP server.
What is the system requirement?
Starting with version 2.0, both DBG server part and the client part can work under Linux as well as
under Windows. It has been tested under Windows (95,98,ME), Windows NT series (4.0, 2000, XP),
RedHat (6.2, 7.0, 7.1, 7.2), Mandrake (8.0), SuSe (7.2) and many other Linux favours as well as unixes including Solaris (2.6) and HPUX (11).
I've got following error message:
It means that you tried to load DBG module (php_dbg.dll or dbg.so) that intended to be used with different PHP version.
DBG is an API-version dependent module and therefore you have to use it with exact the same php engine it is intended for.
For example, you get this message if dbg module was compiled for php 4.0.6 and you try to load it by php 4.3.2.
'PHP Warning: dbg: Unable to initialize module
Module compiled with debug=0, thread-safety=1 module API=2000XXXX
PHP compiled with debug=0, thread-safety=1 module API=2000YYYY'. What does it mean?
Every time I run script in SE I get message 'Session timeout expired'
Check server configuration, look at phpinfo() result to see whether DBG is installed and working properly.
Also, look at this
Most probably, you didn't follow "Installation of Windows extensions"
Often people keep php extensions in separated directory, it requires to set extension_dir entry in
php.ini to point to this location and also requires to add PHP main directory into PATH environment variable.
If you don't want to do it, please, keep all extensions and php engine together.
I can not install win32 package (an MSI file). What should I do ?
Follow this link http://www.microsoft.com/msdownload/platformsdk/instmsi.htm and install Windows Installer first.
Then, using browser right-click on msi file and choose "Install".
I downloaded and installed Windows Installer, but I still can not install win32 package (an MSI file).
DBG client part uses INT64 values and passes them through the COM interfaces. Please, upgrade your COM engine, follow this link
I'm trying to use SE IDE. I just don't understand what the file mappings are.
When you develop some scripts with PHP, you pleace them to the directory which is available to
the Web server, to PHP engine and to the client's (developer's) host. So, the same physical
directory is seen by those 3 parts as 3 different pathes. For example, if you use Apache Web server
under Linux, you may have DocumentRoot=/usr/local/httproot. This means that any scripts located in
/usr/local/httproot are seen by the PHP engine in this (/usr/local/httproot) path, while the URL root
is, say, http://my_linux_host/. To update or modify or develop new one scripts, it's desirable to have
an access to that directory from the developer's host. Most common way is making this directory mapped
as a remote (networked) drive on the client host. Say, this directory is mapped to the client as X:\
drive. So, you can apply following settings in SE IDE:
Since the server in this example is working under Linux, you have to uncheck "Use backslashes in filenames on remote filesystem".
Also since Linux distiguish lower and higher cases in filenames, you have to uncheck "Make file name low case before mapping".
- HTTP Server root URL: http://my_linux_host/
- Local Root directory: X:\
- Remote Root directory: /usr/local/httproot
I'm trying to work with SE IDE. My development WEB server runs under Linux. Should I install Samba?
Yes, it is necessary to install any service such as Samba to make it possible to map files and directories from the Linux host across the network.
I installed PHP, but every time I loaded a document, I got the message 'Document Contains No Data'! What's going on here?
Try to re-compile all starting with make clean. If the problem persists, follow steps described at php common problems.
Get back-trace (all steps are described there).
Then you should submit your bug report for me.