NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Debugging CLI scripts remotely


Joined: 02 Nov 2010
Posts: 2
Reply with quote
Just purchased PhpEd and love it. I have the debugger installed and working correctly.

I'm on a Windows machine debugging a project on a remote Linux machine (Ubuntu, Apache, MySql, etc.) No trouble remotely debugging php pages served by Apache, but most of the php code on the server is executed on the command line by cron jobs. How can I debug it if I can't run it in IE?

It's no problem debugging /var/www/mypage.php because apache will serve that to my web browser. But several important php files are located in /home/username/scripts and are only run by cron. I can't put a copy locally on my Windows box because the script can only run successfully on the Linux server. I normally SSH to the server and debug with print statements.

Can I debug such php files remotely with DBG?

Thanks.
View user's profileFind all posts by jbbarnesSend private message
Debugging CLI scripts remotely


Joined: 02 Nov 2010
Posts: 2
Reply with quote
Nearly 50 people have read this post, so clearly other people are wondering about it, too?

Any ideas?
View user's profileFind all posts by jbbarnesSend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
The way I debug remote CLI scripts is as follows:
* DBG module installed in php.ini as usual.
* In the PHP script, force breakpoint by adding a line
Code:
DebugBreak ('1@127.0.0.1');

* Have PhpEd open, and execute the script on the server.

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website
Debugging CLI scripts remotely
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