diff --git a/src/components/debugger/CallStackPanel.tsx b/src/components/debugger/CallStackPanel.tsx
index 5b702af2..3febad18 100644
--- a/src/components/debugger/CallStackPanel.tsx
+++ b/src/components/debugger/CallStackPanel.tsx
@@ -143,6 +143,8 @@ export function CallStackPanel() {
};
const handleCopyStack = async () => {
+ // Guard: do not overwrite clipboard when there are no frames
+ if (frames().length === 0) return;
const text = frames()
.map((f) => {
const loc = f.source?.path ? `${f.source.path}:${f.line}${f.column > 0 ? `:${f.column}` : ""}` : "unknown";
@@ -162,7 +164,7 @@ export function CallStackPanel() {
-
+