From 300365d4b2511899967d6e4c502b27dabfd243a9 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Mon, 29 Jun 2020 20:51:29 +0200 Subject: [PATCH] added xdebug_is_debugger_active() (#855) --- PhpStormStubsMap.php | 1 + xdebug/xdebug.php | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/PhpStormStubsMap.php b/PhpStormStubsMap.php index 8c287076..87d7a5ac 100644 --- a/PhpStormStubsMap.php +++ b/PhpStormStubsMap.php @@ -5241,6 +5241,7 @@ const FUNCTIONS = array ( 'xdebug_get_profiler_filename' => 'xdebug/xdebug.php', 'xdebug_get_stack_depth' => 'xdebug/xdebug.php', 'xdebug_get_tracefile_name' => 'xdebug/xdebug.php', + 'xdebug_is_debugger_active' => 'xdebug/xdebug.php', 'xdebug_is_enabled' => 'xdebug/xdebug.php', 'xdebug_memory_usage' => 'xdebug/xdebug.php', 'xdebug_peak_memory_usage' => 'xdebug/xdebug.php', diff --git a/xdebug/xdebug.php b/xdebug/xdebug.php index 81c8a767..306f257f 100644 --- a/xdebug/xdebug.php +++ b/xdebug/xdebug.php @@ -289,6 +289,15 @@ function xdebug_get_headers () {} function xdebug_get_formatted_function_stack() {} +/** + * Returns whether a debugging session is active. + * + * Returns true if a debugging session through DBGp is currently active with a client attached; false, if not. + * + * @return bool + */ +function xdebug_is_debugger_active() {} + define ('XDEBUG_STACK_NO_DESC', 1); define ('XDEBUG_TRACE_APPEND', 1); define ('XDEBUG_TRACE_COMPUTERIZED', 2);