[英]xdebug setup PHP debugging
I have my x debug some what working Ubuntu 11.10 I installed xdebug through apt-get. 我让x调试了一些可以正常工作的Ubuntu 11.10,我通过apt-get安装了xdebug。 These are the instructions I followed: http://molecularsciences.org/articles/installing_xdebug_on_ubuntu_10.x_or_ubuntu_11.x
这些是我遵循的说明: 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. 问题一:如果我使用PHP执行脚本(例如
$php index.php
),该脚本将保持暂停状态,直到我连接调试器并点击运行。 I can not find any options to tell xdebug not to pause unless a break point or exception occurs. 我找不到任何告诉xdebug不要暂停的选项,除非发生断点或异常。
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.
Cookie由Xdebug设置,服务器上的xdebug变量似乎与cookie的值匹配。
Please HELP! 请帮忙! I am bugging out.
我正在整理。 A list of things to check would be of great assistance.
列出要检查的物品会很有帮助。
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
Problem one : 问题一 :
The Pause is not controlled by xdebug but by the client thru dbgp 暂停不受xdebug控制,而是由客户端通过dbgp控制
on eclipse you can: 在日食时,您可以:
from http://devzone.zend.com/1147/debugging-php-applications-with-xdebug/ 来自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.
您将不会在浏览器窗口中看到输出,因为默认情况下Eclipse在脚本的第一行暂停脚本执行,就像在该行上设置了断点一样。 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 如果您使用的是netbeans,则可以
preferences > php > debugging 首选项> PHP>调试
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.
我不知道如何在其他编辑器上执行此操作,但是最终多数民众赞成在这种情况下以及编辑器的行为,而不是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 chrome: https : //chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc
firefox: https://addons.mozilla.org/en-US/firefox/addon/easy-xdebug/?src=search Firefox: https : //addons.mozilla.org/zh-CN/firefox/addon/easy-xdebug/? src = search
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.