View Issue Details

IDProjectCategoryView StatusLast Update
0002188XdebugStep Debuggingpublic2023-11-30 14:49
Reporterderick Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.2dev 
Target Version3.3devFixed in Version3.3.0 
Summary0002188: Step over with fibers does still step into fiber routines
Description

From https://github.com/xdebug/xdebug/pull/890#issue-1728778608:


It seems that the step_over command to stop is not a good behavior in other coroutines, unless this coroutine is destroyed.
For example:

<?php

use Swoole\Coroutine;

use function Swoole\Coroutine\run;

require __DIR__ . '/vendor/autoload.php';

run(function () {
    $a = 1; // position 1
    Coroutine::create(function () {
        $a = 1; // position 2
        Coroutine::sleep(1);
        $a = 1;
    });
    Coroutine::create(function () {
        $a = 1;
        Coroutine::sleep(1);
        $a = 1;
    });
    Coroutine::create(function () {
        $a = 1;
    });
    $b = 1; // position 3
});
$a = 1;

Assuming the program stops at position 1, if I execute the "step_over" command, the program will stop at position 2 (If I want the program to stop at position 2, I think this is what the 'step_into' command should do). According to my understanding, the program should not stop inside any coroutine and should stop at position 3. Currently, the behavior of xdebug in handling the "step_over" command causes erratic behavior when there is an IO switch in a coroutine.

TagsNo tags attached.
Operating System
PHP Version8.2.0-8.2.9

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2023-07-26 09:37 derick New Issue
2023-07-26 10:03 derick Assigned To => derick
2023-07-26 10:03 derick Status new => closed
2023-07-26 10:03 derick Resolution open => fixed
2023-07-26 10:03 derick Fixed in Version => 3.3dev
2023-09-05 17:46 derick Fixed in Version 3.3dev => 3.3.0alpha1
2023-11-30 14:49 derick Fixed in Version 3.3.0alpha1 => 3.3.0