diff --git a/src/features/debugger/__tests__/debugFind.test.tsx b/src/features/debugger/__tests__/debugFind.test.tsx
new file mode 100644
index 00000000..d933fb13
--- /dev/null
+++ b/src/features/debugger/__tests__/debugFind.test.tsx
@@ -0,0 +1,172 @@
+import { beforeEach, describe, expect, it, vi } from "vitest";
+import { fireEvent, render, screen, waitFor } from "@testing-library/react";
+import { ContextMenuHost } from "@/ui";
+import { usePlatform } from "@/platform/platformInfo";
+import { adoptSession, appendConsole, useDebug } from "../state";
+import { DebugConsole } from "../ui/DebugConsole";
+
+const clipboard = vi.hoisted(() => ({ writeText: vi.fn(async () => {}) }));
+
+vi.mock("@tanstack/react-virtual", () => ({
+ useVirtualizer: ({ count }: { count: number }) => ({
+ getTotalSize: () => count * 18,
+ getVirtualItems: () =>
+ Array.from({ length: count }, (_, index) => ({ index, start: index * 18, size: 18, key: index })),
+ scrollToIndex: () => {},
+ measureElement: () => {},
+ measure: () => {},
+ }),
+}));
+
+beforeEach(() => {
+ usePlatform.setState({ os: "macos" });
+ useDebug.setState({ sessions: {}, console: {}, active: null });
+ clipboard.writeText.mockClear();
+ Object.defineProperty(navigator, "clipboard", { value: clipboard, configurable: true });
+ window.getSelection()?.removeAllRanges();
+});
+
+function setup(text = "alpha beta\ngamma Beta\nbeta again\n") {
+ const session = adoptSession(1);
+ appendConsole(1, "stdout", text);
+ const view = render(
+ <>
+