Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Stopping at breakpoints outside of index.php?
Stopping at breakpoints outside of index.php? [message #42548] Wed, 15 August 2007 00:11 Go to next message
Eclipse UserFriend
Originally posted by: noah_ten.yahoo.com

I've recently installed pdt-all-in-one-S20070611_M1-win32 as well as both
the Zend and XDebug debuggers. I'm using them with PHP 5.2.3 and Apache
(2.x) on Windows XP.

I've successfully configured both the Zend and XDebug debuggers so that
they'll stop on a breakpoint in index.php. The problem is getting them to
stop on a breakpoint anywhere else. I'm attempting to debug some stuff
with Drupal (http://www.drupal.org), an open-source CMS that has a large
number of modules and include files. None of these files are ever accessed
directly -- you would never type a URL into your browser that pointed to
one of them -- and the debugger doesn't stop on breakpoints in them even
when I know that Drupal is executing their code.

I've tried stopping on a breakpoint in index.php and stepping into things
until I get to some other file. That works, but it's extremely tedious, to
the point where I'd be better off going back to using print and var_dump.

I've tried stopping on a breakpoint in index.php and clicking "resume";
both XDebug and the Zend debugger will stop on future breakpoints in
index.php when I do this but not on breakpoints set in other files.

I saw the suggestion to switch from the internal browser to an external
one in the newsgroups:

http://www.eclipse.org/newsportal/article.php?id=708&gro up=eclipse.tools.pdt#708

...but unfortunately it didn't make any difference.

Any suggestions? I've also posted this to drupal.org; if the answer comes
back from there I'll post it here (and vice versa).

Thanks,

Noah
Re: Stopping at breakpoints outside of index.php? [message #43233 is a reply to message #42548] Wed, 15 August 2007 14:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dserodio.gmail.com

Noah Mercer wrote:
> I've recently installed pdt-all-in-one-S20070611_M1-win32 as well as
> both the Zend and XDebug debuggers. I'm using them with PHP 5.2.3 and
> Apache (2.x) on Windows XP.
>
> I've successfully configured both the Zend and XDebug debuggers so that
> they'll stop on a breakpoint in index.php. The problem is getting them
> to stop on a breakpoint anywhere else. I'm attempting to debug some
> stuff with Drupal (http://www.drupal.org), an open-source CMS that has a
> large number of modules and include files. None of these files are ever
> accessed directly -- you would never type a URL into your browser that
> pointed to one of them -- and the debugger doesn't stop on breakpoints
> in them even when I know that Drupal is executing their code.
>
> I've tried stopping on a breakpoint in index.php and stepping into
> things until I get to some other file. That works, but it's extremely
> tedious, to the point where I'd be better off going back to using print
> and var_dump.
>
> I've tried stopping on a breakpoint in index.php and clicking "resume";
> both XDebug and the Zend debugger will stop on future breakpoints in
> index.php when I do this but not on breakpoints set in other files.
>
> I saw the suggestion to switch from the internal browser to an external
> one in the newsgroups:
>
> http://www.eclipse.org/newsportal/article.php?id=708&gro up=eclipse.tools.pdt#708
>
>
> ..but unfortunately it didn't make any difference.
>
> Any suggestions? I've also posted this to drupal.org; if the answer
> comes back from there I'll post it here (and vice versa).

I was experiencing this exact same problem; I even created a "hello
world" index.php and process.php, but it didn't work.

I started a thread on this newsgroup on 17/5/2007, and Darnell Turner
tried to help me, but it didn't work either.

But following the suggestion on this post you linked to, it finally
worked! By any chance, is your "external web browser" IE? Did you try
changing it to Firefox?

HTH,
Daniel Serodio
Re: Stopping at breakpoints outside of index.php? [message #43630 is a reply to message #42548] Wed, 15 August 2007 19:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: yched.drupal.free.fr

I am using Xdebug and the Xdebug extension to debug drupal code all the
time, there's absolutely no problem setting breakpoints on .module or
..inc files, so maybe it's something wrong in your setup ?

Yves

Noah Mercer a ecrit le 15/08/2007 02:11:
> I've recently installed pdt-all-in-one-S20070611_M1-win32 as well as
> both the Zend and XDebug debuggers. I'm using them with PHP 5.2.3 and
> Apache (2.x) on Windows XP.
>
> I've successfully configured both the Zend and XDebug debuggers so that
> they'll stop on a breakpoint in index.php. The problem is getting them
> to stop on a breakpoint anywhere else. I'm attempting to debug some
> stuff with Drupal (http://www.drupal.org), an open-source CMS that has a
> large number of modules and include files. None of these files are ever
> accessed directly -- you would never type a URL into your browser that
> pointed to one of them -- and the debugger doesn't stop on breakpoints
> in them even when I know that Drupal is executing their code.
>
> I've tried stopping on a breakpoint in index.php and stepping into
> things until I get to some other file. That works, but it's extremely
> tedious, to the point where I'd be better off going back to using print
> and var_dump.
>
> I've tried stopping on a breakpoint in index.php and clicking "resume";
> both XDebug and the Zend debugger will stop on future breakpoints in
> index.php when I do this but not on breakpoints set in other files.
>
> I saw the suggestion to switch from the internal browser to an external
> one in the newsgroups:
>
> http://www.eclipse.org/newsportal/article.php?id=708&gro up=eclipse.tools.pdt#708
>
>
> ..but unfortunately it didn't make any difference.
>
> Any suggestions? I've also posted this to drupal.org; if the answer
> comes back from there I'll post it here (and vice versa).
>
> Thanks,
>
> Noah
>
Re: Stopping at breakpoints outside of index.php? [message #43754 is a reply to message #43630] Wed, 15 August 2007 23:07 Go to previous message
Eclipse UserFriend
Originally posted by: noah_ten.yahoo.com

It did prove to be something wrong in my setup. (And to answer Daniel's
question, I did happen to switch from the internal browser to Firefox, and
while that might have been part of the fix it certainly wasn't all of it.)

I made the following changes to my setup:

* Upgraded from php 5.2.1 to php 5.2.3
* Installed the Zend debugger client in Eclipse/PDT (theoretically not
necessary from what I understand, but I decided to give it a try)
* Made sure that the Drupal files were fully imported into my project, not
just referenced as include libraries.

I did that last step after I created a tiny test case and discovered that
I could get the debugger to stop on a breakpoint in an externally included
file only if that file was imported into the project, not if it was
referenced as part of an include library directory. To my mind this seems
like a bug - the debugger could certainly see that the files in the
include library directories were source files and it let me set
breakpoints in them, so it seems that it should stop on them. (For
comparison from a separate (java) IDE, IntelliJ will let you define
breakpoints in jar files as long as you tell it where the source is. Once
you've defined it, it will stop on it.)

I think it was principally that last step that did the trick, so I'd
suggest that anyone else with a similar problem make sure that isn't an
issue in their setup first, and then try the other steps.
Previous Topic:bug in editor syntax
Next Topic:is it required to propagate debugger settings to subsequent pages?
Goto Forum:
  


Current Time: Mon Sep 23 14:07:00 GMT 2024

Powered by FUDForum. Page generated in 0.05799 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top