Skip to content

Commit

Permalink
Fixed issue #2250: Multiple 'DEBUG SESSION ENDED' messages with XDEBU…
Browse files Browse the repository at this point in the history
…G_SESSION_STOP_NO_EXEC
  • Loading branch information
derickr committed Jul 18, 2024
1 parent 32193fa commit 6c06192
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/base/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,10 +838,6 @@ static bool should_run_user_handler(zend_execute_data *execute_data)
zend_op_array *op_array = &(execute_data->func->op_array);
zend_execute_data *prev_edata = execute_data->prev_execute_data;

if (xdebug_debugger_bailout_if_no_exec_requested()) {
return false;
}

if (!ZEND_USER_CODE(op_array->type)) {
return false;
}
Expand Down
12 changes: 12 additions & 0 deletions tests/debugger/bug02250.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--TEST--
Test for bug #2250: Multiple 'DEBUG SESSION ENDED' messages
--INI--
xdebug.mode=debug
--GET--
XDEBUG_SESSION_STOP_NO_EXEC=netbeans-xdebug
--FILE--
<?php
xdebug_info();
?>
--EXPECT--
DEBUG SESSION ENDED
4 changes: 4 additions & 0 deletions xdebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,10 @@ PHP_RINIT_FUNCTION(xdebug)
}
if (XDEBUG_MODE_IS(XDEBUG_MODE_STEP_DEBUG)) {
xdebug_debugger_rinit();

if (xdebug_debugger_bailout_if_no_exec_requested()) {
zend_bailout();
}
}
if (XDEBUG_MODE_IS(XDEBUG_MODE_DEVELOP)) {
xdebug_develop_rinit();
Expand Down

0 comments on commit 6c06192

Please sign in to comment.