<bdo id='SUL9J'></bdo><ul id='SUL9J'></ul>
    <legend id='SUL9J'><style id='SUL9J'><dir id='SUL9J'><q id='SUL9J'></q></dir></style></legend>
  1. <tfoot id='SUL9J'></tfoot>
  2. <i id='SUL9J'><tr id='SUL9J'><dt id='SUL9J'><q id='SUL9J'><span id='SUL9J'><b id='SUL9J'><form id='SUL9J'><ins id='SUL9J'></ins><ul id='SUL9J'></ul><sub id='SUL9J'></sub></form><legend id='SUL9J'></legend><bdo id='SUL9J'><pre id='SUL9J'><center id='SUL9J'></center></pre></bdo></b><th id='SUL9J'></th></span></q></dt></tr></i><div id='SUL9J'><tfoot id='SUL9J'></tfoot><dl id='SUL9J'><fieldset id='SUL9J'></fieldset></dl></div>

      <small id='SUL9J'></small><noframes id='SUL9J'>

    1. 根据外部请求在 Netbeans 中启动 XDebug

      时间:2023-09-22

      <small id='b5DpD'></small><noframes id='b5DpD'>

    2. <i id='b5DpD'><tr id='b5DpD'><dt id='b5DpD'><q id='b5DpD'><span id='b5DpD'><b id='b5DpD'><form id='b5DpD'><ins id='b5DpD'></ins><ul id='b5DpD'></ul><sub id='b5DpD'></sub></form><legend id='b5DpD'></legend><bdo id='b5DpD'><pre id='b5DpD'><center id='b5DpD'></center></pre></bdo></b><th id='b5DpD'></th></span></q></dt></tr></i><div id='b5DpD'><tfoot id='b5DpD'></tfoot><dl id='b5DpD'><fieldset id='b5DpD'></fieldset></dl></div>
        • <bdo id='b5DpD'></bdo><ul id='b5DpD'></ul>

            <tbody id='b5DpD'></tbody>

              <legend id='b5DpD'><style id='b5DpD'><dir id='b5DpD'><q id='b5DpD'></q></dir></style></legend>
              <tfoot id='b5DpD'></tfoot>

                本文介绍了根据外部请求在 Netbeans 中启动 XDebug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我正在使用 Netbeans 6.7 和 XDebug 在我的机器上调试 PHP 站点,从 Netbeans 内启动请求(项目->调试).这很好用,而且非常有用.

                I'm using Netbeans 6.7 and XDebug to debug a PHP site on my machine, launching the request from within Netbeans (Project->Debug). This works fine, and is very useful.

                我的问题是:是否可以将调试器附加到任何传入的请求中,而不仅仅是我从 Netbeans 中启动的请求?

                My question is: Is it possible to attach the debugger to any request that comes in, rather just those I launch from within Netbeans?

                即,不是单击调试",而是将 Netbeans 置于启动调试器并附加到进入的下一个请求的模式中.

                ie, instead of clicking "Debug", put Netbeans into a mode whereby the debugger is launched and attaches to the next request that comes in.

                我觉得这可能是一个愚蠢的问题,但如果可能的话,那就太好了.

                I have a feeling this may be a stupid question, but if it is possible, that'd be great.

                更多信息

                我的系统(Ubuntu 9.04)设置如下:

                My system (Ubuntu 9.04) is set up as follows:

                /etc/php5/conf.d/xdebug.ini的内容

                zend_extension=/usr/lib/php5/20060613/xdebug.so
                
                xdebug.remote_enable=on
                xdebug.remote_handler=dbgp
                xdebug.remote_mode=req
                xdebug.remote_host=localhost
                xdebug.remote_port=9000
                xdebug.idekey=netbeans-xdebug
                

                Netbeans PHP 调试选项为默认值:

                Netbeans PHP debugging options are at the defaults:

                Debugger Port: 9000
                Session ID: netbeans-xdebug
                Stop at the First Line: ticked
                

                我的 /etc/hosts 文件将 www.mywebsite.com 重定向到 localhost

                My /etc/hosts file redirects www.mywebsite.com to localhost

                如果我单击 Netbeans 中的调试按钮,Firefox 将使用地址 http://www.mywebsite.com?XDEBUG_SESSION_START=netbeans-xdebug 启动,并且调试器按预期工作.

                If I click on the debug button in Netbeans, then Firefox is launched with the address http://www.mywebsite.com?XDEBUG_SESSION_START=netbeans-xdebug, and the debugger works as expected.

                但如果我只是浏览到 http://www.mywebsite.com?XDEBUG_SESSION_START=netbeans-xdebug,这不会在 Netbeans 中启动调试器.

                But if I just browse to http://www.mywebsite.com?XDEBUG_SESSION_START=netbeans-xdebug, this doesn't start the debugger in Netbeans.

                我也试过设置 xdebug.remote_host=www.mywebsite.com ,但这没什么区别.

                I've also tried setting xdebug.remote_host=www.mywebsite.com , but that makes no difference.

                此外,我已经启用了 xdebug.remote_log,它显示了我从 netbeans 内部启动时的信息,但没有显示外部请求的信息.所以我认为 XDebug 根本没有看到外部请求.

                Also, I've enabled xdebug.remote_log, and that's showing information for when I start from within netbeans, but nothing for external requests. So I don't think XDebug is seeing the external requests at all.

                推荐答案

                转到项目属性 > 运行配置 > 高级 > 调试网址并检查不要打开网络浏览器 (*).不要调试器代理下设置主机.保存这些设置.在项目窗口中,在您的项目上:鼠标右键单击 > 调试(这将开始侦听调试连接).没有启动浏览器.在浏览器中输入 http://www.mywebsite.com?XDEBUG_SESSION_START=netbeans-xdebug.它应该在 netbeans 中崩溃.至少这就是这里发生的事情:)

                go to project properties > run configuration > advanced > debug url and check do not open web browser (*). do not set the host under debugger proxy. save these settings. in the project window, on your project: right mouse click > debug (this starts listening for debug connections). no browser is started. enter http://www.mywebsite.com?XDEBUG_SESSION_START=netbeans-xdebug in your browser. it should break in netbeans. at least that's what happens here :)

                (*) 你可能还需要设置一个路径映射 - 对我来说,它不需要

                (*) you might also have to set a path mapping - for me, it works without

                这篇关于根据外部请求在 Netbeans 中启动 XDebug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:Xdebug 成功连接到 DBGP 客户端,但不会在断点处停 下一篇:如何使用 netbeans 和 Xdebug 调试 PHP

                相关文章

                最新文章

                <legend id='lpYhf'><style id='lpYhf'><dir id='lpYhf'><q id='lpYhf'></q></dir></style></legend>

              • <tfoot id='lpYhf'></tfoot>
                    <bdo id='lpYhf'></bdo><ul id='lpYhf'></ul>

                  1. <i id='lpYhf'><tr id='lpYhf'><dt id='lpYhf'><q id='lpYhf'><span id='lpYhf'><b id='lpYhf'><form id='lpYhf'><ins id='lpYhf'></ins><ul id='lpYhf'></ul><sub id='lpYhf'></sub></form><legend id='lpYhf'></legend><bdo id='lpYhf'><pre id='lpYhf'><center id='lpYhf'></center></pre></bdo></b><th id='lpYhf'></th></span></q></dt></tr></i><div id='lpYhf'><tfoot id='lpYhf'></tfoot><dl id='lpYhf'><fieldset id='lpYhf'></fieldset></dl></div>
                  2. <small id='lpYhf'></small><noframes id='lpYhf'>