Debugging Cake app via DBG or Zend Debugger

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Debugging Cake app via DBG or Zend Debugger

Steveston

Hi there,

I wonder if anybody here can do me a favor by sharing his/her
experience in debugging a Cake app by DBG (if you are using PhpED) or
Zend Debugger ( if you are using Zend Studio or PDT).

I have troubles in debugging, esp, breakpoints I set seem not work
properly. I am not sure if it because of mod_rewrite setting or
something else. While trying to debug only the app, I always 'dive'
into the framework's codes

Thanks,


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Debugging Cake app via DBG or Zend Debugger

Chris Hartjes

On 5/29/07, Ming <[hidden email]> wrote:
>
> Hi there,
>
> I wonder if anybody here can do me a favor by sharing his/her
> experience in debugging a Cake app by DBG (if you are using PhpED) or
> Zend Debugger ( if you are using Zend Studio or PDT).
>

I've used Komodo and XDebug to take a look at what's going on and
didn't have any problems setting breakpoints etc.  Maybe you should
ask this question on a Zend Studio mailing list?

--
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Debugging Cake app via DBG or Zend Debugger

Joshua Benner-2

I tried Zend Debugger but couldn't get it to load in my PHP environment
properly, then I tried Xdebug (there's an Xdebug extension for PDT), and
it worked beautifully! Only one workstation can debug per server,
though. Still, it's wonderful to have access to debugger functionality.

Chris Hartjes wrote:

> On 5/29/07, Ming <[hidden email]> wrote:
>  
>> Hi there,
>>
>> I wonder if anybody here can do me a favor by sharing his/her
>> experience in debugging a Cake app by DBG (if you are using PhpED) or
>> Zend Debugger ( if you are using Zend Studio or PDT).
>>
>>    
>
> I've used Komodo and XDebug to take a look at what's going on and
> didn't have any problems setting breakpoints etc.  Maybe you should
> ask this question on a Zend Studio mailing list?
>
>  

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Debugging Cake app via DBG or Zend Debugger

mars-8

I managed to get it done with PDT on Eclipse using Zend Debugger.

The following link provides excellent documentation on setting up your
eclipse with zend debugger.
http://www.thierryb.net/pdtwiki/index.php?title=Using_PDT_:_Installation_:_Installing_the_Zend_Debugger

Make sure that you are not trying to debug sites that are defined with
aliases in the Apache conf file.  Your document root and any folders
under the documentroot will be debugged properly.

To help you setup something similar to what I've done, i recommend you
go to the following CakePHP tutorial:
http://www.sitepoint.com/article/application-development-cakephp

once you've setup your eclipse with the info i've provided, you can
begin.
PLEASE note that you must not use the mod_rewrite setting in Apache.
this means deleting the .htaccess files and modifiying the
/app/config/core.php file and uncommenting the following line -> "
define ('BASE_URL', env('SCRIPT_NAME'));"

Create a PHP Web Page debug configuration as you should have done
already.

for  the "File/Project" field enter the following info -> /CakePHP/app/
webroot/index.php  (where CakePHP is your cake folder)
for "URL"  deselect "Auto Generate"  and use the following url "http://
localhost/CakePHP/index.php/notes/index"

The point to keep in mind is that you must always start your debug
from the /webroot/index.php page.

the url is defined by pointing to your views application directory.
In my case, notes contained the views to be called.  Using the
following url would display the pages correctly ->
http://localhost/CakePHP/index.php/notes/index  -> which translates
to /app/views/notes in my application directory.




On May 30, 11:36 am, Joshua Benner <[hidden email]> wrote:

> I tried Zend Debugger but couldn't get it to load in my PHP environment
> properly, then I tried Xdebug (there's an Xdebug extension for PDT), and
> it worked beautifully! Only one workstation can debug per server,
> though. Still, it's wonderful to have access to debugger functionality.
>
> Chris Hartjes wrote:
> > On 5/29/07, Ming <[hidden email]> wrote:
>
> >> Hi there,
>
> >> I wonder if anybody here can do me a favor by sharing his/her
> >> experience indebugginga Cake app by DBG (if you are using PhpED) or
> >> Zend Debugger ( if you are using Zend Studio or PDT).
>
> > I've used Komodo and XDebug to take a look at what's going on and
> > didn't have any problems setting breakpoints etc.  Maybe you should
> > ask this question on a Zend Studio mailing list?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Debugging Cake app via DBG or Zend Debugger

mars-8

I also want to add the following in case some stuff isn't clear or
missing.


1) my cake directory resides in my DocumentRoot -> www/CakePHP
2) I mentioned above that you must alwasy begin your debug session by
pointing to /app/webroot/index.php.
    ->if you don't do this, you won't get the break to stop.  Also,
you can add other breakpoints to resume too once you've initially
defined index.php as your page to start with.
3)I defined my CakePHP setup as a dev one as yo'uve seen above in
point 1.
4) the "core.php" file defined in your /app/config directory will tell
you where you should remove the .htaccess files from.
5)I've tested trying to debug with with mod_rewrite and unfortunately,
although the debugger stops at index.php, the other pages with
breakpoints don't get picked up.  That is why I've mentioned not using
mod_rewrite.  If anyone has figured out otherwise, please let me know.


Thanks


On Jul 12, 1:19 am, mars <[hidden email]> wrote:

> I managed to get it done with PDT on Eclipse using Zend Debugger.
>
> The following link provides excellent documentation on setting up your
> eclipse with zend debugger.http://www.thierryb.net/pdtwiki/index.php?title=Using_PDT_:_Installat...
>
> Make sure that you are not trying to debug sites that are defined with
> aliases in the Apache conf file.  Your document root and any folders
> under the documentroot will be debugged properly.
>
> To help you setup something similar to what I've done, i recommend you
> go to the following CakePHP tutorial:http://www.sitepoint.com/article/application-development-cakephp
>
> once you've setup your eclipse with the info i've provided, you can
> begin.
> PLEASE note that you must not use the mod_rewrite setting in Apache.
> this means deleting the .htaccess files and modifiying the
> /app/config/core.php file and uncommenting the following line -> "
> define ('BASE_URL', env('SCRIPT_NAME'));"
>
> Create a PHP Web Page debug configuration as you should have done
> already.
>
> for  the "File/Project" field enter the following info -> /CakePHP/app/
> webroot/index.php  (where CakePHP is your cake folder)
> for "URL"  deselect "Auto Generate"  and use the following url "http://
> localhost/CakePHP/index.php/notes/index"
>
> The point to keep in mind is that you must always start your debug
> from the /webroot/index.php page.
>
> the url is defined by pointing to your views application directory.
> In my case, notes contained the views to be called.  Using the
> following url would display the pages correctly ->http://localhost/CakePHP/index.php/notes/index -> which translates
> to /app/views/notes in my application directory.
>
> On May 30, 11:36 am, Joshua Benner <[hidden email]> wrote:
>
>
>
> > I tried Zend Debugger but couldn't get it to load in my PHP environment
> > properly, then I tried Xdebug (there's an Xdebug extension for PDT), and
> > it worked beautifully! Only one workstation can debug per server,
> > though. Still, it's wonderful to have access to debugger functionality.
>
> > Chris Hartjes wrote:
> > > On 5/29/07, Ming <[hidden email]> wrote:
>
> > >> Hi there,
>
> > >> I wonder if anybody here can do me a favor by sharing his/her
> > >> experience indebugginga Cake app by DBG (if you are using PhpED) or
> > >> Zend Debugger ( if you are using Zend Studio or PDT).
>
> > > I've used Komodo and XDebug to take a look at what's going on and
> > > didn't have any problems setting breakpoints etc.  Maybe you should
> > > ask this question on a Zend Studio mailing list?- Hide quoted text -
>
> - Show quoted text -


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Loading...