xdebug.start_start_with_request=yes WITHOUT error if the debug client is not listening(xdebug.start_start_with_request=yes 如果调试客户端没有监听,则没有错误)
问题描述
I used to have the following configuration with Xdebug 2:
xdebug.default_enable=1
Xdebug did not slow down execution when no debug client was listening but when I needed to debug something then I only had to enable the listening in PhpStorm and refresh the page. No browser extension was needed for this. The same applied for debugging CLI applications, it just worked.
I tried to achieve the same with Xdebug 3 with the following configuration:
xdebug.mode=debug
xdebug.start_start_with_request=yes
It works the same BUT every time when I disable debug listening in PhpStorm and run a CLI command I get the following message with error severity:
Xdebug: [Step Debug] Could not connect to debugging client. Tried: 172.17.0.1:9003 (through xdebug.client_host/xdebug.client_port) :-(
This is something that I could live with but it also makes PHPUnit tests fails beStrictAboutOutputDuringTests="true"
is enabled.
The upgrade guide suggest to use xdebug.module=develop
if I used xdebug.default_enable=1
but that is not a valid replacement.
Completely silencing ALL Xdebug logs or even disabling error reporting in PHP suggested by this comment looks a dirty hack to me with possible drawbacks instead of a valid solution.
How can I keep the expected behavior without this message?
thanks for sharing your thoughts about this Derick.
Setting xdebug.log_level=0 means you hide all warnings and errors, which makes it impossible to debug anything. Don't do that.
I do not want to do this at all, but currently I do not see an another way around to keep the old behavior as I explained in the issue description.
Previously a lot of people were having issue with getting Xdebug to work, and having this warning is really useful to them to point out that something is going wrong.
I totally understand the motivation behind this new behavior and I also see it could be useful for many people. Although, the fact that this warning cannot be suppressed can cause problems to those who knows what they are doing.
Well, "what they are doing" is maybe an inappropriate phrase, what they want is probably better...
We had a workflow in our company with xDebug 2 that did not require any additional browser extension or environment variable (see above), just the listening to xDebug connection had to be enabled in the IDE and magic... It is a documented solutation and our Docker based developer stack made sure that xDebug worked OOTB for every developer. (Again, without any additional dependency)
Are you suggesting that this workflow is not supported anymore in xDebug 3?
Is there any chance to add a new configuration to xDebug 3 that would allow suppressing only these new warnings and enabling "expert mode"?
这篇关于xdebug.start_start_with_request=yes 如果调试客户端没有监听,则没有错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:xdebug.start_start_with_request=yes 如果调试客户端没有监听,则没有错误
基础教程推荐
- Libpuzzle 索引数百万张图片? 2022-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- 在多维数组中查找最大值 2021-01-01