Sublime xdebug中断...“get_option(”没有断点

时间:2015-11-06 09:30:38

标签: php wordpress debugging xdebug

我已搜索并搜索但无法找到解决方案或有人遇到同样的问题。

我有一个带有wordrpress安装的xampp。我使用了与xdebug的sublime,它可以很好地调试我的代码,但它在许多我没有断点的地方打破。

在不同的文件和地方,我可以使用wordpress命令get_option();。

获得选项
$sub01 = get_option(woomps_sub01);
$sub02 = get_option(woomps_sub02);

在另一个文件中,它在session-> set:

处中断
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功能。

1 个答案:

答案 0 :(得分:2)

如果您进入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粘贴设置中的整个代码 - 默认并删除有关通知的部分。 (这可能不是最佳做法,但对我有用)。