我搜索了又搜索,但找不到解决方案或有人遇到同样的问题。
我有一个无字安装的示例。我在xdebug中使用了sublime,它可以很好地调试我的代码,但它在许多没有断点的地方会中断。
在不同的文件和地方,我可以使用wordpress命令get_option();获得选项;。
$sub01 = get_option(woomps_sub01);
$sub02 = get_option(woomps_sub02);
在另一个文件中,它在会话->设置时中断:
WC()->session->set( 'sub_qty' , $total_qty );
如果我运行这个,它会再次在另一行中断:
$result = @call_user_func_array(array($class, 'create'), $parameters);
然后它进一步运行,并在另一个文件中的另一个get_option处停止:
$items_left_start = get_option(woomps_limit01);
我的断点窗口为空。我已清除缓存文件夹。我可以尝试重置其他xdebug清除操作吗?或者,我在哪里可以找到关于如何学习xdebug如何将这些行解释为断点的信息?
我发现了一篇关于不可见断点的文章,但对我来说不是这样的。我在断点窗口中看不到任何东西。https://forums.netbeans.org/ptopic43927.html
我正在使用Run函数。
如果进入Tools -> xDebug -> Settings - Default
,您将看到以下设置:
// Break on exceptions, suspend execution
// when the exception name matches an entry in this list value.
"break_on_exception": [
// E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR
"Fatal error",
// E_RECOVERABLE_ERROR (since PHP 5.2.0)
"Catchable fatal error",
// E_WARNING, E_CORE_WARNING, E_COMPILE_WARNING, E_USER_WARNING
"Warning",
// E_PARSE
"Parse error",
// E_NOTICE, E_USER_NOTICE
"Notice",
// E_STRICT
"Strict standards",
// E_DEPRECATED, E_USER_DEPRECATED (since PHP 5.3.0)
"Deprecated",
// 0
"Xdebug",
// default
"Unknown error"
],
"通知"会破坏我粘贴在上面的代码。也告诉Sublime/xDebug不要破坏这个代码,进入Tools -> xDebug -> Setings - User
从设置粘贴整个代码-默认并删除关于通知的部分。(这可能不是最好的做法,但对我来说很有效)。