
Gubed And Quanta Plus

About

Quanta Plus is an advanced web development suite that comes with KDE
(but also works without KDE, of course). Part of the development effort
of Gubed was to integrate it into Quanta, which was done by implementing
a general Quanta debugger interface and a Gubed plugin for that interface.


Getting Quanta

If you use KDE, chances are you already have Quanta installed. Otherwise it
can be obtained from http://quanta.sf.net which also has installation
instructions. It's also likely that your distribution has Quanta packages.


Getting the Gubed Debugger Plugin for Quanta

The Quanta Gubed debugger plugin is a part of the main Quanta distribution,
so once you have Quanta installed, you should also have the plugin.


Setting up a Quanta Project to use Gubed

To set up a Quanta project to use Gubed, open the project settings dialog (Shift
+ F7). In the lower part of the dialog is a debugger section where you can 
chose debugger plugin to use. Chose Gubed and click the 'Options' button to
the right of the drop down.
In the dialog presented, you can chose your Gubed preferences. 

Local and Server basedirs

These directories tells Quanta how to map between files on the server and files
locally. For example, the server starts executing /var/www/somesite/index.php 
and Quanta should then open that file and show the current line of execution.
But on the client running Quanta, the 'somesite' directory is mounted in 
/home/somedeveloper/sites/somesite/ so Quanta needs to open 
/home/somedeveloper/sites/somesite/index.php not /var/www/somesite/index.php.
In this case, the 'server basedir' should be set to  '/var/www/somesite/' and the
'local basedir' set to '/home/somedeveloper/sites/somesite/'.
Quanta can then tell where to find index.php on the local box. 
If your php instance is running on the same box as quanta, these can both be
left blank.

Network settings

Next on the page is 'Use proxy' and its 'Proxy host' and 'Proxy port' settings as 
well as 'Listen port'. If you use the Gubed proxy, you'll need to check the proxy
checkbox and enter the hostname or ip and port of the proxy server.
If you don't use the proxy, enter the port you wish Quanta to listen to for 
connections, default is 8016.

Debug Behaviour

This is where you configure what errors to break on and what speed to 'run' in.
'Running' for Gubed is when it executes the script while showing the current line
of execution. Gubed can also 'leap', which is when it executes but doesent care
to show line or update watches until a breakpoint or error is reached.


Debugging

Once everything is set up and configured (and you've also set up the server), 
you can start debugging. When you load a project that has Gubed activated, 
Quanta will automatically start listening to the debug port (or connect to the
proxy, when used). If it cant, you can manually start listening/connecting to 
proxy by chosing the menu option 'Start Session'. Likewise, you can tell 
Quanta to stop listening for incoming connections by chosing 'End Session'.

Once Quanta is ready for connections, open a browser and point it to your
Gubed directory on the webserver. (That directory is a part of the distribution
archive, see 'serversetup.txt' for more info)
You will then see the Gubed welcome page and from there, you can click
the link to enter the Gubed testbench to test your setup, or to 'StartSession.php' 
('specify script to debug') to start debugging your own scripts.

Currently, starting the debugsession directly from Quanta and viewing the 
result in the Quanta preview window is not supported.


Read More
Werner Joss has been kind enough as to put together an introduction page for
the Quanta and Gubed combination: 
http://www.hoernerfranzracing.de/kde/gubed.html
