NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
PHP CLI Debugging


Joined: 25 Jul 2006
Posts: 70
Reply with quote
I'm having some difficulty in getting a debug session started from the command line, it works fine through a browser and if I put in a DebugBreak() in the script, even the command line will break into a debugger.

I'm running it as such:
php test.php DBGSESSID=1@127.0.0.1:7869;d=1

php -v
PHP 5.2.2 (cli) (built: May 2 2007 19:18:26)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with DBG v3.1.11, (C) 2000,2007, by Dmitri Dmitrienko
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.2.8, Copyright (c) 1998-2007, by Zend Technologies


Any ideas what may be up?
View user's profileFind all posts by cpriestSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
I'm not sure I got you right.
Please provide more details on what you're trying to achive.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 25 Jul 2006
Posts: 70
Reply with quote
I'm running into this problem. I'm trying to start a command line script from a linux command prompt with the following:

php test.php Profile=dev DBGSESSID=1@72.84.10.104:7869;d=1,p=1

But its not connecting to my windows box, I'm watching the PHP DBG Listener running on my local machine.

I can put in a DebugBreak('1@72.84.10.104:7869;d=1,p=1'); and it starts the debug session fine.

Any idea why I can't start this from the command line? I read on some post this was allowed as a command line argument.

Thanks!
View user's profileFind all posts by cpriestSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
is it CLI or CGI version of php you're trying to debug?
please check with php -i output

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 25 Jul 2006
Posts: 70
Reply with quote
It's CLI:

PHP 5.2.5 (cli) (built: Dec 11 2007 10:20:33)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with DBG v3.2.10, (C) 2000,2007, by Dmitri Dmitrienko
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
View user's profileFind all posts by cpriestSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
I just checked and it worked fine for me.
Please check if $_SERVER['argv'] array contains DBGSESSID variable with appropriate content you specified in the command line.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
PHP CLI Debugging
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