0
votes

I have my x debug some what working Ubuntu 11.10 I installed xdebug through apt-get. These are the instructions I followed: http://molecularsciences.org/articles/installing_xdebug_on_ubuntu_10.x_or_ubuntu_11.x

I am having though some difficulties getting certain things to work and have some oddities I can not fix. I have Googled my little heart out before asking.

Problem one: If I execute a script with PHP (for example, $php index.php), the script stays paused until I attach a debugger and hit run. I can not find any options to tell xdebug not to pause unless a break point or exception occurs.

Problem two: No matter what I seem to try I can not trigger the debugger from the browser. The cookie is being set by Xdebug and the xdebug variable on the server seems to match the value of the cookie.

Please HELP! I am bugging out. A list of things to check would be of great assistance.



phpInfo xdebug settings


Directive   Local Value Master Value
xdebug.auto_trace   Off Off
xdebug.collect_assignments  Off Off
xdebug.collect_includes On  On
xdebug.collect_params   0   0
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.file_link_format no value    no value
xdebug.idekey   root    macgdbp
xdebug.manual_url   http://www.php.net  http://www.php.net
xdebug.max_nesting_level    100 100
xdebug.overload_var_dump    On  On
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 cachegrind.out.%p   cachegrind.out.%p
xdebug.remote_autostart Off Off
xdebug.remote_connect_back  Off Off
xdebug.remote_cookie_expire_time    3600    3600
xdebug.remote_enable    On  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.scream   Off Off
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    trace.%c    trace.%c
xdebug.var_display_max_children 128 128
xdebug.var_display_max_data 512 512
xdebug.var_display_max_depth    3   3
1
Is your IDE on the same computer as the web server? If not you need to change this xdebug.remote_host=127.0.0.1 to your ip.Danilo Kobold

1 Answers

1
votes

Problem one:

The Pause is not controlled by xdebug but by the client thru dbgp

on eclipse you can:

from http://devzone.zend.com/1147/debugging-php-applications-with-xdebug/

You will not see output in the browser window yet, because Eclipse by default pauses script execution on the first line of the script, as if a breakpoint were set on this line. If you want to disable this behaviour, uncheck the Break at First Line checkbox in the Breakpoint section from the debug dialog configuration window.

And if you are using netbeans you can

preferences > php > debugging

and uncheck the "Stop at first line". I don't know about how to do it on other editors but ultimately thats and editor behavior, not xdebug.

Problem two: I'v experienced this issue a few times and fixed with a browser extension.

chrome: https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc

firefox: https://addons.mozilla.org/en-US/firefox/addon/easy-xdebug/?src=search