дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 11:15:40 +02:00
feat(debugger): flash the taskbar when a breakpoint is hit in an unfocused window (#1810)
A breakpoint stop now grabs attention like IDEA's: the owning window's taskbar button flashes while the window is in the background (new window_flash_taskbar command wrapping request_user_attention, which never flashes a focused window), and the flash is stopped when the window is focused, the paused thread resumes, or the session ends. A window running with Focus application on breakpoint still focuses instead of flashing, and repeated hits while already flashing do not re-request attention. Closes #1742 Signed-off-by: Inf1mum <[email protected]>
Цей коміт міститься в:
1 джерело
1f969694a0
коміт
fb694aaceb
6 files changed
+191
No files matched your search
@@ -29,6 +29,7 @@ import { breakpointsOf, consumeTemporary, flushBreakpoints, refreshStates, reset
|
||||
import { interpolateLog, logParts, suspends } from "./breakpoints/model";
|
||||
import { syncSpecial, useSpecialBreakpoints } from "./breakpoints/special";
|
||||
import { refreshExceptionFilters } from "./breakpoints/exceptions";
|
||||
import { flashTaskbarForBreakpoint, stopTaskbarFlash } from "./taskbarFlash";
|
||||
import { missingAdapter } from "./missingAdapter";
|
||||
import { startFailureMessage } from "./startFailure";
|
||||
|
||||
@@ -713,6 +714,7 @@ export function sessionSupports(cap: keyof DebugCapabilities, s: DebugSession |
|
||||
}
|
||||
|
||||
function markTerminated(id: DebugSessionId) {
|
||||
stopTaskbarFlash();
|
||||
patch(id, { status: "terminated", endedAt: Date.now(), frames: [], selectedFrame: null, stoppedThread: null });
|
||||
const st = useDebug.getState();
|
||||
if (st.active === id) {
|
||||
@@ -1013,13 +1015,17 @@ export function handleDebugEvent(id: DebugSessionId, event: DebugEvent) {
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
// Attention for a background window: focusing the app and flashing the taskbar are
|
||||
// alternatives (IDEA), so a window configured to grab focus does not also flash.
|
||||
if (dbg.focusAppOnBreakpoint) focusAppWindow();
|
||||
else if (isBp) flashTaskbarForBreakpoint();
|
||||
break;
|
||||
}
|
||||
case "continued": {
|
||||
const cur = useDebug.getState().sessions[id]!;
|
||||
if (cur.status === "terminated") break;
|
||||
if (!event.allThreadsContinued && event.threadId !== (cur.selectedThread ?? cur.stoppedThread)) break;
|
||||
stopTaskbarFlash();
|
||||
patch(id, {
|
||||
status: "running",
|
||||
frames: [],
|
||||
|
||||
Reference in new issue
Заблокувати користувача