|
Posted by Tony Marston on 07/20/05 21:18
"Dale" <dale.drinkard@gmail.com> wrote in message
news:1121876196.453035.186810@g14g2000cwa.googlegroups.com...
> Windows XP, Apache 2.0.54, PHP 5.0.4, MySQL 4.1
> running on my local machine
>
> I want to migrate to more sophisticated debugging: setting breakpoints,
> watching variables, step into/over, etc.
>
> I installed PHPEdit 1.2.3.159 and discovered I have to install a
> separate debugger. I downloaded dbg-2.11.32-win32-php5, copied the
> file php_dbg.dll.5.0.3 to c:\php5\ext\php_dbg.dll (I realize I'm
> running 5.0.4 but 5.0.3 appears to be the latest dbg dll)
>
> I update my php.ini file by including the following lines:
> extension=php_dbg.dll
>
> ;;;;;;;;;;;;;;;;;;;;;
> ; Debugger Settings ;
> ;;;;;;;;;;;;;;;;;;;;;
> [debugger]
> debugger.enabled=on
> debugger.profiler_enabled=on
> debugger.hosts_allow=localhost
> debugger.hosts_deny=ALL
> debugger.ports=7869, 10000/16
>
> I restarted Apache.
>
> I wrote the following script in PHPEdit:
> <?php
> debugger_on(localhost);
> echo "hello world";
> ?>
>
> When I click the "Run script with debugger" button I get:
> An internal error has occured with code 0; Check if DBG listner is
> launched
>
> I clicked debug->Start Listner (nothing obvious happened).
>
> * I have read all the help with PHPEdit and I cannot find a simple
> example. Am I missing the boat completely? Do I browse to the php
> file and the debugger "springs" into action? Am I dreaming to think
> you can do with PHP what I'm use to using my Borland C++ Builder? Do I
> need to start drinking *before* noon?
>
> Many thanks...
I have been using PHPEdit for several years now, so here are some tips:
(1) Copy php_dbg.dll-5.0.3 to the php5/ext directory
(2) Modify your php.ini file to enable this extension thus:
extension=php_dbg.dll-5.0.3
(3) Start PHPEdit. Select Debugger->Debugger Settings. In the tab at the
bottom marked 'HTTP' set the following:
- HTTP server root URL: http://localhost/
- Local root directory: C:/Apache2/HTDOCS (or whatever you have called it)
- Remote root directory: (same as above)
(4) When you want to start debugging a script that you are running from your
web browser you must insert a debugbreak() command. This will activate the
debugger when it hits that line. You can then use the step in/out/over
options.
The debugger should be installed automatically when you install PHPEdit, and
when you start PHPEdit it should automatically start the listener which
inserts a little icon (a radio dish) into the system tray.
Hope this helps.
--
Tony Marston
http://www.tonymarston.net
Navigation:
[Reply to this message]
|