NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] PEAR and PHPEd Debugging Local Script


Joined: 14 Mar 2008
Posts: 3
Reply with quote
Debugging a local script is supposed to be simply a matter of loading up the script file and hitting debug... right?

But when I do this with any of my scripts that access PEAR files it fails (can't find file) even though they work if run directly from
the console.

I am currently evaluating so am almost certainly missing something. I don't want to have to set up a whole project just to quickly debug a standalone script... can someone tell me how to set up PHPEd so that it automatically knows where to find PEAR files and any other groups of common files that I might have - by default.

Your help appreciated.
View user's profileFind all posts by georgezSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
Debugging a local script is supposed to be simply a matter of loading up the script file and hitting debug... right?

Right. All you need is debugger module installed and project properly configured.

Quote:
But when I do this with any of my scripts that access PEAR files it fails (can't find file) even though they work if run directly from
the console.

When you referred to console, did you mean that you tried the same php that you tried to debug or you have another one in your system? Looks like you have one php with PEAR installed and one that came with PhpED with debugger installed.

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


Joined: 14 Mar 2008
Posts: 3
Reply with quote
You are right, I already had the latest version of php installed before installing the evaluation copy of PHD. When I run scripts outside of PHPEd I have no problem.

I am able to debug scripts within PHPEd, however they fail when they reach any include statement that would normally rely on a path directive. I therefore assume that I have setup PHPEd and the Debugger correctly. I am used to Zend Studio but am thinking of changing over because it really does not seem to support php5 very well ( particularly extensions ), phped seems to have the most common extensions already configured.

The reason I posted this issue, is because I got a follow up email from phpEd where they state...

Quote:
Debugging local PHP scripts
Thanks to NuSphere's "working out of the box" approach debugging of local PHP scripts can be done with out any additional setup. To run your local PHP script in the debugger, you can simply:

* Open the script in the editor
* Hit Run in Debug button and start stepping through the code, checking the variables and PHP objects, assigning new values to the variables, setting watches and breakpoints and everything else you may possibly need to find and eliminate the defects.


Having to set up a project just to debug a standalone, simple script seems a real pain, so I was really pleased to see this statement... But it does not seem possible to set thing up "by default" so that someone can simply open a script and go.... Without having to go through a whole setup process first.

Any clarification would be appreciated!
View user's profileFind all posts by georgezSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
Having to set up a project just to debug a standalone, simple script seems a real pain

no pain at all, but seems it has relation to the issue.

Quote:
I am able to debug scripts within PHPEd, however they fail when they reach any include statement that would normally rely on a path directive

Correct if you mean include_path directive. And the directive itself in php that comes with PhpED may differ from the one you have in the PHP that you installed before. So it explains why one php may work fine while another won't.
I'd recommend you to run phpinfo in both and compare, or configure PhpED to work with your php. In latter case you may want to update path to php-cgi.exe in Tools->Settings->SRV web server and add zend_extension_ts="c:\path\to\php-dbg.dll-5.2.x" into php.ini that your php uses.

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


Joined: 14 Mar 2008
Posts: 3
Reply with quote
Thanks - That sorted it out and I now see clearly how things are set up. I went into phped's version of php.ini and modified the pear path in the include_path directory to the PEAR directory for my pear setup and now it all works as expected! I have decided for now to let phped use its own version of php and keep it separate from the original version on my machine.

Thanks for your help! Very Happy
View user's profileFind all posts by georgezSend private message
[resolved] PEAR and PHPEd Debugging Local Script
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