Add a status entry showing loaded python extensions & debugger status

This commit is contained in:
baldurk
2026-08-13 17:46:40 +01:00
parent 3c6dfd23b4
commit 02ead51303
8 changed files with 92 additions and 0 deletions
@@ -2113,6 +2113,22 @@ PyObject *PythonContext::outstream_trace(PyObject *self, PyObject *args, PyObjec
return self;
}
bool PythonContext::IsDebuggerConnected()
{
if(!m_DebugPy)
return false;
PyGILState_STATE gil = PyGILState_Ensure();
PyObject *is_connected = PyObject_CallMethod(m_DebugPy, "is_client_connected", NULL);
bool ret = (PyBool_Check(is_connected) && is_connected == Py_True);
Py_XDECREF(is_connected);
PyGILState_Release(gil);
return ret;
}
void PythonContext::PrepareDebuggerWait()
{
if(!m_DebugPy)