Welcome Guest, Not a member yet? Register   Sign In
IDE's with debuggers that actually work with CodeIgniter
#13

[eluser]Myles Wakeham[/eluser]
I'm encouraged to hear that you guys have been able to get NetBeans and xDebug working together. But I cannot share the joy with this, even after 2 days of trying to get it going...

Maybe someone with better luck (or the scars of battle and prize of winning) could share some ideas on what is going wrong, because I'm out of ideas.

I have a Windows XP SP3 dev laptop machine, with WAMP (Apache 2, PHP 5.2.9) installed with CI. I use Firefox 3.5.x for my testing.

I have a large enterprise app that I'm trying to debug. I'm down to the last 5% of development work on this app, which has taken me about 12 months and although I've been able to live without trace level debugging, its now killing me not having it. What I need to be able to do is to step trace through functions, models, controllers, etc. within CI by setting breakpoints and letting the code execute until the breakpoint is hit, then fire back to the IDE and let me visualize what is executing, variable content, etc. This is considered a mandatory standard in any development environment I've worked with in the past, and not having this is crippling my ability to deliver my clients their solutions. So I did my research, checked out videos, etc. and it appears to be available. Now its just a matter of getting it working.

I've been using Zend Studio for Eclipse. Unfortunately my experience with the Zend debugger was fine for a simple 1 dimensional script. But not a full-on MVC app like a CI app, so it didn't work for me. I downloaded and installed NetBeans 6.7.1 on Friday and watched a great video on their website about debugging and realized this would be the solution for me. Sure, Netbeans is a pain to start up. Everyone seems to think that is because its written in Java, but actually that's not the problem. Its the time that its taking to 'scan projects' that is killing me, but as we are using SVN with it I'm thinking that its all got to do with SVN version handling but I can't be sure. Anyway I can live with the startup time if I could just get this debugger working...

So I setup all the xDebug stuff in Apache. There's a clump of code on Sun's website showing how to test if xDebug is setup correctly, and I ran that successfully. xDebug is correctly showing in phpinfo and the test php code. I used the test code found here:

http://blogs.sun.com/netbeansphp/entry/h...stallation

xDebug is definitely responding correctly on port 9000 as the test proves.

But whenever I start NetBeans and try and debug my code, it just sits there with the message 'Waiting for connection' and never responds back. If I eventually stop the debugger, I get back an information dialog with 'There is no connection from xdebug detected in xx seconds...' and telling me a bunch of settings I need to add to my php.ini file. Well they are all there and its working fine outside of Netbeans.

I scanned my computer for other php.ini files that maybe Netbeans is detecting and changed them all to a different filename to force Netbeans to work with the correct one. No difference. This is what is set in my php.ini file, which I believe is correct for this to work (and as its working outside of Netbeans, I can only assume Netbeans is the problem):

Code:
[XDebug]
zend_extension_ts = "C:\wamp\bin\php\php5.2.9-2\ext\php_xdebug.dll"
xdebug.remote_enable=1
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
cgi.force_redirect = 0

I checked the version of php_xdebug.dll and its correct for php 5.2.9 and since its working outside of NetBeans, its not causing Apache to crash or anything like that.

The only other thing I can think of that might be a problem here is how NetBeans Project Properties are set for my code. Since CI projects are kinda strange in their URLs and Netbeans seems to want to support a page and then GET arguments afterwards, I setup a simple PHP test script to see if it would even just call that, and again no luck - its just waiting at the 'Waiting for connection' again. If I execute the page directly from Netbeans, it works fine with Firefox. Just a problem with the debugger.

I'd really appreciate any advice on how to get past this. Its now really taking a chunk out of my progress on this system and I have to deliver very soon, so I need this up and running pronto.

Thanks in advance for any help or advice.

Myles


Messages In This Thread
IDE's with debuggers that actually work with CodeIgniter - by El Forum - 09-20-2009, 02:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB