Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/325.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
netbeans中的php xdebug-如何查看变量的值?_Php_Python_Debugging_Netbeans_Xdebug - Fatal编程技术网

netbeans中的php xdebug-如何查看变量的值?

netbeans中的php xdebug-如何查看变量的值?,php,python,debugging,netbeans,xdebug,Php,Python,Debugging,Netbeans,Xdebug,我在php.ini文件中启用了xdebug,如下所示: [XDebug] zend_extension = "D:\xampp\php\ext\php_xdebug.dll" xdebug.profiler_append = 0 xdebug.profiler_enable = 1 xdebug.profiler_enable_trigger = 0 xdebug.profiler_output_dir = "D:\xampp\tmp" xdebug.profiler_output_name =

我在
php.ini
文件中启用了
xdebug
,如下所示:

[XDebug]
zend_extension = "D:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.trace_output_dir = "D:\xampp\tmp"
我的netbeans设置与他们的手册相同。现在,当我尝试Ctrl+F5时(在第140行设置断点之后),它显示如下:

[XDebug]
zend_extension = "D:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.trace_output_dir = "D:\xampp\tmp"

如何在下面的netbean控制台中查看
$user\u id
(或任何其他变量的值)


或者是否有任何方法可以通过在CLI中设置断点和检查变量值来调试PHP代码,如python
导入pdb;pdb.set_trace()
???这样代码就可以在特定的行中中断(当执行诸如提交表单或重新加载浏览器之类的操作时),然后我可以在断点之前检查每个变量,甚至在断点之后继续检查每个变量

xdebug.remote_enable = 1
xdebug.remote_host = localhost
xdebug.remote_port = 9000
还要确保zend_extension=“D:\xampp\php\ext\php\uxdebug.dll”是正确的。在我的电脑上我有/而不是\,不确定这是否重要

2.重新启动服务器(不确定是否需要)

3.在工具->选项->PHP->调试中检查netbeans配置

4.检查项目属性:“浏览器”和“运行配置”


如果一切正常,您可以在netbeans内设置断点并启动调试:“调试”->“调试项目”

Xdebug未正确设置/工作(“等待连接”),请重新检查您的设置。可能应该启用远程\u启用。并确保在浏览器中正确启动xdebug会话。远程启用,现在的问题是断点停止核心库(CodeIgniter)第一行中的代码执行,但我在我的自定义控制器中设置了断点,或者在IDE中禁用“第一行中断”,或者只需单击“播放”转到下一个断点。帮助。现在我如何在浏览器重新加载时设置断点和查看变量??假设在提交时想要设置断点,我在netbeans上也遇到了一些问题,特别是在其中调试magento,在chrome(扩展名)中使用xdebug helper完成了这项任务,请确保右键单击图标并设置您正在使用netbeans.Tested,就像您编写的一样,即使有几个配置。与问题中给出的图像相同您是否通过netbeans启动调试?另外:在屏幕截图中可以看到“等待连接”,因此xdebug似乎配置错误。检查你的日志