mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[FreezeLogger] do not report if under debug
This commit is contained in:
@@ -27,6 +27,7 @@ import com.intellij.util.Alarm;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.lang.management.ThreadInfo;
|
||||
|
||||
public class FreezeLoggerImpl extends FreezeLogger {
|
||||
@@ -37,7 +38,7 @@ public class FreezeLoggerImpl extends FreezeLogger {
|
||||
|
||||
@Override
|
||||
public void runUnderPerformanceMonitor(@Nullable Project project, @NotNull Runnable action) {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
if (isUnderDebug() || ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
action.run();
|
||||
return;
|
||||
}
|
||||
@@ -83,6 +84,10 @@ public class FreezeLoggerImpl extends FreezeLogger {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isUnderDebug() {
|
||||
return ManagementFactory.getRuntimeMXBean().getInputArguments().toString().contains("jdwp");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ThreadDumpInfo {
|
||||
|
||||
Reference in New Issue
Block a user