WI-33168 Application no longer takes focus when hitting a breakpoint in 2016.3 EAP during PHP Debug

This commit is contained in:
Svetlana.Zemlyanskaya
2016-11-04 16:30:30 +01:00
parent 42adff0bc6
commit c9a83faec0
@@ -785,20 +785,21 @@ public class XDebugSessionImpl implements XDebugSession {
updateExecutionPosition();
if (myShowTabOnSuspend.compareAndSet(true, false)) {
final boolean showOnSuspend = myShowTabOnSuspend.compareAndSet(true, false);
if (showOnSuspend || attract) {
AppUIUtil.invokeLaterIfProjectAlive(myProject, () -> {
initSessionTab(null);
showSessionTab();
});
}
if (showOnSuspend) {
initSessionTab(null);
showSessionTab();
}
myDispatcher.getMulticaster().sessionPaused();
// user attractions should only be made if event happens independently (e.g. program paused/suspended)
// and should not be made when user steps in the code
if (attract) {
UIUtil.invokeLaterIfNeeded(() -> {
if (mySessionTab != null) {
// user attractions should only be made if event happens independently (e.g. program paused/suspended)
// and should not be made when user steps in the code
if (attract) {
if (mySessionTab == null) {
LOG.warn("Can not request focus because Session Tab is not initialized yet");
return;
}
if (XDebuggerSettingManagerImpl.getInstanceImpl().getGeneralSettings().isShowDebuggerOnBreakpoint()) {
mySessionTab.toFront(true, this::updateExecutionPosition);
@@ -814,6 +815,8 @@ public class XDebugSessionImpl implements XDebugSession {
}
});
}
myDispatcher.getMulticaster().sessionPaused();
}
@Override