Login
Email:
Parola:
Cont nou
Am uitat parola





Recente
Poti face download la jocul Far-Cry gratis ·
Top vanzari jocuri PC ·
Grand Theft Auto IV amanat pentru 2008 ·
Icube-competita de inovatie si stinta in tehnologie editia 2007 ·
Yahoo va scoate limita de 1G la webmail ·
Fotosinteza artificiala a fost produsa in laborator ·
Oracle acuza SAP de furt industrial ·
Vechiile becuri pe cale de disparitie ·
37 de companii romanesti la CeBIT 2007 ·
RCS&RDS ieftineste abonamentele de internet ·

Browse

RSS / Atom


Cauta:

dXDev ::

Pspad with php debugger

I work a lot with PsPad at my php projects, and is very heplfully if I have an script debugger associated with PsPad . From this editor you can set breakpoints , and then reload the script with Firefox and start debugging.

1) First you need to install Php expert debugger:

Expert Debugger is a free easy-to-use tool for debugging PHP scripts. Expert Debugger uses the DBG PHP Debugger and allow to debug scripts via network or on local computer. You can run scripts in step-by-step mode and to trace values of any variables and script output. The debugger has a comfortable interface and can be integrated with IDE or editors

Expert debugger installation directory is: C:\Program Files\Expert Debugger\. You can find extra informations in the .chm file.

Installing php DBG:

1. Copy php_dbg.dll into directory where you have other php extensions installed. The php_dbg.dll files includes in this distributive. They locate in folders “PHP_DBG.DLL”. You can download a last version of DBG PHP Debugger and php_dbg.dll files for any supported versions of PHP at http://dd.ron.ru/dbg/ 2. Edit php.ini 2.1. Find list of extension= entries and add:

extension=php_dbg.dll

2.2. If you use ZendOptimizer or other Zend extension(s), add:

zend_extension=/pathtophpextensions/php_dbg.dll

Just after or immediately before such entry for ZendOptimizer.

2.3. Somewhere below extension=php_dbg.dll line add the following section:

[Debugger]
debugger.enabled=on
debugger.profiler_enabled=on

Tip
I disabled the profiller because when I debug large projects with the profiler on, my CPU hangs at 100% load for 10-20 seconds. With the profiler off , debugging is much faster.

3. Create and run new php script file with call to phpinfo() function and make sure dbg is listed there twice: one time in the head and second in the DBG section.

When you start debugging make sure that you opened DbgListener.exe, you can see it running in tray bar(an satellite dish).

2) Second you need PHPdebugger Firefox extension:

A debugging toolbar for use with servers running DBG. Enable debugging of the current page, the next page, next form submit or the whole session from a toolbar menu.

Tip
This extension creates a new toolbar with only 3 buttons. Firefox interface can be highly customized from view->toolbars->customize. You can drag that icon in other place on your existing toolbars and then you can disable phpDebugger toolbar and your browser will look more ergonomic.

3) Third you will need phpBkp.js script in PsPad for setting breakpoints.

Copy phpBkp.js in your \Script\Jscript, restart editor. In PsPad, set some bookmarks in your script ( shortcuts: Ctrl+Shift+0-9 ), and then run “Save php breakpoints” script from Scripts menu( shortcut:Ctrl+Alt+B ).

Now from Firefox when you will debug your script, you will see that breakpoints are initialized.



A.Radu

Nu se mai pot adauga comentarii la acest articol.

Anterior :
Urmatorul :





<December 2008 
DuLuMaMiJoViSa
 123456
78910111213
14151617181920
21222324252627
28293031   
© dXDev 2007 | Contact | Chestionare auto, teste auto online