Sublime xdebug breaks at …”get_option(” without breakpoint

I have searched and searched but cant find the solution or someone haveing the same issue.

I have a xampp with wordrpress installation. I use sublime with xdebug and it works good to debug my code, but it breaks at many places where i dont have breakpoints.

Read More

In different files and places i get options with the wordpress command get_option();.

$sub01 = get_option(woomps_sub01);
$sub02 = get_option(woomps_sub02);

And in another file it breaks at session->set:

WC()->session->set( 'sub_qty' , $total_qty );

If i run this it breaks at another line again:

$result = @call_user_func_array(array($class, 'create'), $parameters);

Then its runs further and stops at another get_option in another file:

$items_left_start = get_option(woomps_limit01);

My breakpoint window is empty. I have cleared the cache folder. Is there any other xdebug clear operations i can try to reset this? Or where can i find the information on how to learn how xdebug can interpret this lines as breakpoints?

I found an article about invisible breakpoints, but it was not like this for me. I dont see anything in my breakpoint window.
https://forums.netbeans.org/ptopic43927.html

Im useing the Run function.

Related posts

1 comment

  1. If you go into Tools -> xDebug -> Settings - Default you will see the following setting:

        // 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"
    ],
    

    The “Notice” will break the code i have pasted above. Too tell Sublime/xDebug not to break this code, go into Tools -> xDebug -> Setings - User paste the whole code from settings – Default and remove the part about notice. (This maybe not best practise, but works for me).

Comments are closed.