Hi,
I'm desparate seeking for the answer how to debug an PHP script from the browser.
I'm running everything Locally an there seems to be no tech.issues.
I can do a debug PHP script run,
but what i need is to
a: set the breakpoint(s) in my script
b: start the browser with the GUI in a manner that debugger pops up at the breakpoint ...
as said technically everythings is Ok ? (see below)
Hopefully someone got it working and want's to help out here,
tnx,
Jaap.
in PHP.INI:
; xdebug config added by Komodo
zend_extension_ts=C:\PHP52\ext\php_xdebug.dll
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
output parts PHPINFO()
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
with Xdebug v2.0.0RC2-dev, Copyright (c) 2002, 2003, 2004, 2005, 2006, by Derick Rethans
...and..
xdebug
xdebug support enabled
Version 2.0.0RC2-dev
Supported protocols Revision
DBGp - Common DeBuGger Protocol $Revision: 1.111 $
GDB - GNU Debugger protocol $Revision: 1.82 $
PHP3 - PHP 3 Debugger protocol $Revision: 1.20 $
Directive Local Value Master Value
xdebug.allowed_clients no value no value
xdebug.auto_trace Off Off
xdebug.collect_includes On On
xdebug.collect_params Off Off
xdebug.collect_return Off Off
xdebug.collect_vars Off Off
xdebug.default_enable On On
xdebug.dump.COOKIE no value no value
xdebug.dump.ENV no value no value
xdebug.dump.FILES no value no value
xdebug.dump.GET no value no value
xdebug.dump.POST no value no value
xdebug.dump.REQUEST no value no value
xdebug.dump.SERVER no value no value
xdebug.dump.SESSION no value no value
xdebug.dump_globals On On
xdebug.dump_once On On
xdebug.dump_undefined Off Off
xdebug.extended_info On On
xdebug.idekey Captain Fint no value
xdebug.manual_url http://www.php.net http://www.php.net
xdebug.max_nesting_level 100 100
xdebug.profiler_aggregate Off Off
xdebug.profiler_append Off Off
xdebug.profiler_enable Off Off
xdebug.profiler_enable_trigger Off Off
xdebug.profiler_output_dir /tmp /tmp
xdebug.profiler_output_name crc32 crc32
xdebug.remote_autostart Off Off
xdebug.remote_enable Off On
xdebug.remote_handler dbgp dbgp
xdebug.remote_host 127.0.0.1 127.0.0.1
xdebug.remote_log no value no value
xdebug.remote_mode req req
xdebug.remote_port 9000 9000
xdebug.show_exception_trace Off Off
xdebug.show_local_vars Off Off
xdebug.show_mem_delta Off Off
xdebug.trace_format 0 0
xdebug.trace_options 0 0
xdebug.trace_output_dir /tmp /tmp
xdebug.trace_output_name crc32 crc32
xdebug.var_display_max_data 512 512
xdebug.var_display_max_depth 2 2
For tips on troubleshooting remote debugging problems, please read over this blog post:
http://blogs.activestate.com/jeffg/2006/09/remote_debuggin.html
If you have additional questions or run into troble, feel free to post back here.
--
JeffG | Komodo 4.0 Beta | MacBook Pro OS X Intel / Ubuntu 6.06 i386
I'm having a simillar problem with Komodo debugger.
I've followed the blog post, everything seems ok from the php side.
Komodo OTOH fails for some reason:
Edit>Preferences>Debugger>Proxy
"Listen for debugger connections on port" : 9000
"V" "Enable debugger proxy"
"Proxy listener address" : 127.0.0.1
"Proxy Key" : my_own_original_key
I'm using Ubuntu egdy with Komodo personal edition (Still on the 21 day trail).
Doing
gives nothing.
Also, going to Debug>Listen for remote debugger... gives the following error:
"Debugger initialization Error"
"Unable to initialize the debugging system because Debugging will be unavailable until you change the debugger port in your preferences. You can try setting the port to zero which will allow your system to select an available port."
I've tried to set different port (10005) and it still didn't work.
Help please.
Please try disabling the proxy, and then try enabling the debugger listener. Does this work?
--
JeffG | Komodo 4.0 Beta | MacBook Pro OS X Intel / Ubuntu 6.06 i386
quote:
Please try disabling the proxy, and then try enabling the debugger listener. Does this work?
Euh, yes, but that brings meback at the start of this thread:
Hi,
I'm desparate seeking for the answer how to debug an PHP script from the browser.
I'm running everything Locally an there seems to be no tech.issues.
I can do a debug PHP script run,
but what i need is to
a: set the breakpoint(s) in my script
b: start the browser with the GUI in a manner that debugger pops up at the breakpoint ...
regards,
Jaap.
To get the functionality you want you need to configure Komodo and your local web server for 'remote debugging'. This is covered in this blog post:
http://blogs.activestate.com/jeffg/2006/09/remote_debuggin.html
This will enable you to trigger debugging sessions in Komodo from a web browser using Apache or a similar web server. Does this help?
--
JeffG | Komodo 4.0 Beta | MacBook Pro OS X Intel / Ubuntu 6.06 i386
YES ! Finally ... the trick in this case is to put the
zend_extension_ts=C:\PHP52\ext\php_xdebug.dll
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
in BOTH PHP.INI
this is: the Komodo one in the ..\Debug directory
but also the one used by your normal default/apache browser.
Thnx!,
It looks like there's no longer Debug directory in Komodo installation directory (Komodo 5.1.4), and this step is not needed anymore.
http://blogs.activestate.com/jeffg/2006/09/remote_debuggin.html is no longer available. Could URL continuity be implemented on this site?
Posts I made from that blog are currently unavailable, and I'm unclear as to when they can be made available again. If it helps, that post is also very old and probably of not much use anymore. You're much better off looking a the current docs:
http://docs.activestate.com/komodo/5.1/debugphp.html
--
JeffG
http://www.openkomodo.com/blogs/jeffg
Thanks.
I just made debugging work and would like to share what I have found to help others avoid the same problem I experienced.
I had had it working with WAMP server but switched recently to XAMPP installation. XAMPP php.ini enabled php_xdebug.dll in the Dynamic Extensions section, in addition to specifying the file in [XDebug] section. This worked for me partially -- debugging session started but ended immediately ignoring breakpoints. Everything started to work properly after I commented out the extension=php_xdebug.dll entry in the Dynamic Extensions section.
You may want to add this to your documentation if it doesn't say that already.
P.S. I switched from WAMP to XAMPP hoping this would solve my frequent crashes of Apache server.
Read about it at http://community.activestate.com/forum-topic/apache-crashes#comment-9812