ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-gtk-general
php-gtk-general
[PHP-GTK] PHP-GTK real time debugging - mini how-to
by =A3ukasz_Wojciechowski other posts by this author
May 15 2005 5:23PM messages near this date
Re[2]: [PHP-GTK] infinite loop problem :( | [PHP-GTK] disable keypress on GtkButton
Hello everyone

In couple of last weeks Im developing little app in php-gtk.
I had few very hard moments caused for example by php references (or
rather "lack of them" in object meaning) - in that concrete example I
know that references was my problem just after I was able to realtime
(step by step) debug my code - It was'nt easy.

I was searching Internet very long and I found just scrap of
informations but now I can finally realtime debug php-gtk code.

I will give a few instructions on how to start.

1. Download xdebug extension to php from www.xdebug.org
2. Follow instructions on http://xdebug.org/install.php to activate
xdebug extension
3. Follow instructions on http://xdebug.org/docs-debugger.php to
configure "remote debugging"
4. You have to download, install and configure DBGp debugger protocol
Client. I was searching tools for windows
platform and I found two (Im using komodo):
ActiveState Komodo - http://www.activestate.com/Products/Komodo/
Maguma Workbench - http://www.maguma.com/?article=wkb_benefits&id=2

You have to make sure that debugger client/server uses the same port -
default if 9000 - I was have to change this setting in Komodo

5. Now, if all goes right way and you are running Komodo or Maguma
with debugger in listening mode after you run your script it should
stop on the first line and you can run your script line by line.
When you go over to gtk::main() call you should "step into" that call
and you are inside of gtk main loop - you can set breakpoint on some
signal handler function, let the script go (debugger "play" button),
make some action in GUI that will emits handled singal and you are
again in Komodo or Maguma with script stopped - and again and
again.........

I hope that this little how-to will be helpful for anyone.

btw. On xdebug site there is a DBGp Protocol text client which
comunnicates in xml one way - you can try
debug your script with this tool - I tried :) and after few seconds i
was googling with "dbgp gui client" ;-)
  

-- 
Pozdrawiam
£ukasz Wojciechowski

-- 
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
=A3ukasz_Wojciechowski
Nghia
Scott Mattocks
Scott Mattocks

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved