Need Help debugging drupal with ActiveState Komodo
I'm using Komodo on a Mac,and trying to debug my local drupal install. I know this is possible as I see someone has already done it http://old.mostlygeek.com/node/83. Everything seems to be installed correctly: komodo is listening on port 9000 and the php.ini is defined to use 9000. I can debug by executing the program within the debugger and supplying the arguments but I can't seem to get it to work the other way, i.e appending the XDEBUG_SESSION_START= to the url.
For example I've tried http://localhost/drupal-4.7.2/?q=view/jobsbydeadline?XDEBUG_SESSION_START=bpretsel but I think this confuses drupal so I get page not found.
I'd really appreciate some pointers from anyone who managed to get this to work.

querystrings, cleanURLs, and appending name value pairs
bazzaboy-
Querystrings are created by stringing together name=value pairs separated by & (ampersand). The initial "?" deliniates a host/document from its params, so there should be only one ?. Because drupal already uses ?q=..., you should try replacing ?XDEBUG_ with &XDEBUG_.... Keep this in mind when switching to drupal CleanURLs-- it will likely require you to stay with the & or to switch back to ? again.
I'm very new to komodo (also evaluating NuSphere PHPEd which looks Very nice), so I'm interested to hear how it goes for you. Especially remote debugging...
--
..happiness is point and click..
as luck would have it, I just got it working.
I have just spent an hour or so gettting it all working this evening after numerous attempts.
Jeff Griffiths from Activestate was helpful and our correspondance can be seen in the comments section here.
I'm happy with the Komodo debugger setup, and it is quiet nice for navigating the code i.e. tree view of files and functions and clicking on a function also displays the comments for it. This should help me no end in getting further faster with Drupal.
I also evaled Zend but I didn't get on with the IDE, it wasn't to my taste. Also it cost more than I wanted to spend.
I may now try to get xdebug working with phpeclipse, but I'm in no real rush since now my debugging in Komodo works.
thanks for the pointers on php params.
I've now written a tutorial
I wrote up my findings and experience into a tutorial on drupal org uk, here.
Screencast of Getting Komodo Debugging Working w/ Drupal
Thanks for the tutorial for getting Komodo up and running with Drupal.
I know that I used it as a reference when I was getting it to work a while ago.
John VanDyk's post: Remote PHP Debugging on Intel-based Macs with Komodo was also very helpful and is a must-read.
I was having trouble getting all of the settings correct and getting some errors, and so I typed up my step-by-step things to try to get it working. This isn't exact, but I thought I'd put it out there for anyone struggling to get it working.
I also made a brief screencast video -- I was expecting that some of the things wouldn't be set up, but they ended up working.
And so here is some footage of what it looks like to get it working to be able to step through Drupal code line by line.
Click to Play Quicktime | Flash Version
Here some steps to try in order to get it working:
Preferences -> System Preferences -> MySQL -> Start MySQL Server
Open Komodo
Go to Komodo -> Preferences -> PHP -> Debugger Configuration should read
"WARNING PHP is not configured for debugging. You can use the configuration wizard to configure PHP for debugging."
Open Finder -> /users/kent/komodo/ini
Delete php.ini
Open Finder -> /users/kent/komodo/extensions
Delete xdebug.so
Go to Komodo -> Preferences -> PHP -> Debugger Configuration ->
* Click "Debugger Config Wizard "
* Click Continue
* Keep PHP path set to /usr/local/php5/bin/php
* Click Continue
* INI file to be copied: "/usr/local/php5/lib/php.ini" & Put debug version of ini at: "/Users/kent/komodo/ini"
* Click Continue
Change use this extensions directory to "/Users/kent/komodo/extensions"
* Click Continue
* Ready to Install -- Click Continue
* Finished with Installation -- Click Done
Click "Okay" to Close Preferences
Go to Komodo -> Preferences -> PHP ->Debugger Configuration should now read "PHP is configured for debugging. You can use the configuration wizard to reconfigure if you have changed our primary ini file."
Place phpinfo.php file that calls phpinfo() in / library/webserver/documents
Open Firefox and go to x/phpinfo.php?XDEBUG_SESSION_START=1
This will initialize Komodo
Go to Komodo -> Debug -> "Listen for Debugging Connections"
Copy, download and compile the latest XDebug from here.
See here for more details.
Replace "/users/kent/komodo/extensions/xdebug.so" with "/usr/local/bin/xdebug-2.0.0RC3/xdebug-2.0.0RC3/modules/xdebug.so"
cp /usr/local/bin/xdebug-2.0.0RC3/xdebug-2.0.0RC3/modules/xdebug.so /users/kent/komodo/extensions/
XDebug helper extension
And...
If you're using firefox 2.x, you can use the XDebug helper extension to turn your debugging session on/off with the click of a button. No more manually adding the query string. It's slick.
I've been using 4.1 to step through custom modules and even ajax callbacks - it kicks major butt.
Chris.
http://www.trailheadinteractive.com
--- Featured Projects ---
http://www.montanakitesports.com
http://www.cmrussell.org
http://www.tdandh.com
http://www.cccsmt.org
http://www.universalsemensales.com
I wrote a tutorial "From
I wrote a tutorial "From Nothing to Everything with Ubuntu, Drupal, and Komodo Debugging" at http://www.kevinbridges.org/node/164