void () { ExecutionEnvironment environment = ((XDebugSessionImpl)getSession()).getExecutionEnvironment(); if (environment == null) return; RunProfile runProfile = environment.getRunProfile(); if (runProfile instanceof AbstractPythonTestRunConfiguration && PyDebuggerOptionsProvider.getInstance(getProject()).isDropIntoDebuggerOnFailedTest()) { myDebugger.setUnitTestDebuggingMode(); } }