NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Can't figure out how DBG works


Joined: 04 Jul 2005
Posts: 3
Reply with quote
I'm trying DBG for the first time. I've been reading up on it but it still doesn't work. The information is rather scarce, and whatever info I found didn't help, so I'm asking here.

I've installed DBG (and DBG-CLI) from source on a Debian system. We already have a working setup with multiple developers each using their own virtual hosts and CVS to work on various projects/versions simultaneously.

My first question is: will several people be able to use DBG at the same time ie. debug different scripts simultaneously without any restrictions?

Second, I've followed the instructions but neither dbg-cli nor the PSD client for Windows don't show any reaction.

PSD I've simply started, it says "Server listening at port 7869" and just sits there. I've verified and process psd.exe is listed listening on port 7689.

Same thing with dbg-cli. I start it up, I say "set port 7869", then "show port" and it says "7869", then "listen" and it shows up as 0.0.0.0:7869 in netstat.

The php.ini contains the following (in regard to dbg):

Code:
[debugger]
debugger.enabled=True
debugger.profiler_enabled=True
debugger.hosts_allow=localhost 172.16.111.13
debugger.hosts_deny=ALL
debugger.ports=7869, 10000/16


"Localhost" is the Debian server, where I'm running dbg-cli, and .13 is a developer Windows machine.

What next? I've tried appending "?DBGSESSID=1@127.0.0.1:7869" to a script URL but I get nothing. I tried making fatal errors in scripts, still nothing. What am I missing?
View user's profileFind all posts by wirespotSend private message


Joined: 09 Dec 2003
Posts: 92
Reply with quote
Is the dbg extension installed? Check phpinfo() output.
View user's profileFind all posts by mpSend private message


Joined: 04 Jul 2005
Posts: 3
Reply with quote
Yes, I've checked and it's there.
View user's profileFind all posts by wirespotSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
My first question is: will several people be able to use DBG at the same time ie. debug different scripts simultaneously without any restrictions?

yes, they will be able without any restrictions.

Quote:
Yes, I've checked and it's there

I'm not sure how you checked it. Please do it from one of the clients computers. Just create short php file with phpinfo call and make sure that DBG is listed in the output and it is ENABLED (on).

Quote:
Second, I've followed the instructions but neither dbg-cli nor the PSD client for Windows don't show any reaction.

What is PSD?
Regarding dbg-cli, did you turn it into HTTP mode?
Did you set HTTP url root and directory root?
Do you have other zend_extension modules installed? Please list them.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 04 Jul 2005
Posts: 3
Reply with quote
ddmitrie wrote:
Quote:
Yes, I've checked and it's there

I'm not sure how you checked it. Please do it from one of the clients computers. Just create short php file with phpinfo call and make sure that DBG is listed in the output and it is ENABLED (on).


I have the following in phpinfo() on the server:

Quote:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with DBG v2.11.32, (C) 2000,2005, by Dmitri Dmitrienko with Zend Extension Manager v1.0.7, Copyright (c) 2003-2005, by Zend Technologies with Zend Optimizer v2.5.10, Copyright (c) 1998-2005, by Zend Technologies


That's the only place I can find "DBG", I hope it's enough.

ddmitrie wrote:
Quote:
Second, I've followed the instructions but neither dbg-cli nor the PSD client for Windows don't show any reaction.

What is PSD?
Regarding dbg-cli, did you turn it into HTTP mode?
Did you set HTTP url root and directory root?
Do you have other zend_extension modules installed? Please list them.


PSD is a PHP Source Debugger, a Windows debugging client, seems to strive to be a front-end for dbg. I hoped it would be an alternative but so far it doesn't work. (We're more or less stuck with EditPlus here, since management won't shell out for a decent PHP editor w/ debugging interface. Rolling Eyes )

I've ogled at the output of the "help" command some more and read more on this forum. I've come to understand I need more options in dbg-cli. Here's what I do now:

Code:
set port 7869
set mode on
set mapurlroot http://172.16.111.32/
set maplocalroot /srv/http_root/
set mapremoteroot /srv/http_root/
file /srv/http_root/debug.php


I'm a bit confused about the next step. Should I issue a "listen" or a "run"? If I do a "run", the Apache access log gets this:

Code:
GET /debug.php HTTP/1.1


I also tried passing parameters to run, but they are appended to the URL with ?, as if they were a query string. Examples:

Code:
GET /debug.php?http://172.16.111.32/debug.php
GET /debug.php?/srv/http_root/debug.php


Regardless, all run commands end up like this after a few seconds:


Code:
Program exited.
Session start timeout has expired.
Program is not being run.


I've also tried with listen, but calling up debug.php in the browser doesn't do anything.

Is there a manual or tutorial describing these commands inside dbg-cli in more depth?
View user's profileFind all posts by wirespotSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
That's the only place I can find "DBG", I hope it's enough

No, it's not enough. If you don't see DBG section, the extension is not loaded. Please read FAQ on how to install debugger module if any other zend_extension is loaded.
Shortly you have to add zend_extension=dbg.so (or zend_extension_ts=php_dbg.dll under Windows) line and remove extension=dbg.so (extension=php_dbg.dll). Make sure this line appears before any other zend_extension line.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Can't figure out how DBG works
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic