Порівняти коміти

...
Автор SHA1 Повідомлення Дата
l0ng-ai bc42133a36 fix(debugger): keep the selected tab when a step finishes
Every pause brought Threads & Variables to the front, so stepping from the
Console tab switched away from the output after each Step Over. Only a stop
at a breakpoint, exception or pause request does that now; finishing a step
keeps the tab the user is on.

Refs #2494
2026-11-10 23:22:32 +08:00
2 змінених файлів з 13 додано та 1 видалено

No files matched your search

+5
Переглянути файл
@@ -134,6 +134,11 @@ describe("debug tool window", () => {
expect(console.getAttribute("aria-selected")).toBe("true");
act(() => useDebug.setState({ sessions: { 1: session } }));
expect(variables.getAttribute("aria-selected")).toBe("true");
// Stepping from the Console keeps it in front.
fireEvent.click(console);
act(() => useDebug.setState({ sessions: { 1: { ...session, status: "running" } } }));
act(() => useDebug.setState({ sessions: { 1: { ...session, stopReason: "step" } } }));
expect(console.getAttribute("aria-selected")).toBe("true");
});
it("renders session tabs, views, frames and typed variables", async () => {
+8 -1
Переглянути файл
@@ -153,7 +153,14 @@ export function DebugToolWindow() {
setView({
session: active.startedAt,
status: active.status,
tab: active.status === "starting" ? "console" : active.status === "paused" ? "variables" : view.tab,
// A breakpoint or exception brings Threads & Variables to the front; finishing a step keeps
// the tab the user is on (e.g. Console, to watch the output while stepping).
tab:
active.status === "starting"
? "console"
: active.status === "paused" && active.stopReason !== "step"
? "variables"
: view.tab,
});
const tab = view.tab;