void () { DebuggerInvocationUtil.invokeAndWait(myProject, () -> { BreakpointManager breakpointManager = DebuggerManagerEx.getInstanceEx(myProject).getBreakpointManager(); PsiClass psiClass = JavaPsiFacade.getInstance(myProject).findClass("HelloWorld", GlobalSearchScope.allScope(myProject)); assertNotNull(psiClass); Document document = PsiDocumentManager.getInstance(myProject).getDocument(psiClass.getContainingFile()); assertNotNull(breakpointManager.addLineBreakpoint(document, 3)); }, ApplicationManager.getApplication().getDefaultModalityState()); }