diff --git a/web/src/pages/vm.tsx b/web/src/pages/vm.tsx index 357fc0120..a086c068b 100644 --- a/web/src/pages/vm.tsx +++ b/web/src/pages/vm.tsx @@ -83,9 +83,9 @@ const VM = () => { useEffect(() => { vmRunner.current = new (class VMTimer extends Timer { override async tick() { - const {done, lineNumber} = actions.step(); + const { done, lineNumber } = actions.step(); console.log("Breakpoints", breakpoints); - if(breakpoints.includes(lineNumber)){ + if (breakpoints.includes(lineNumber)) { return true; } return done; @@ -417,7 +417,7 @@ function VMStackFrame({

Stack: - [{frame.stack.values.join(", ")}] + {/* [{frame.stack.values.join(", ")}] */}

{frame.usedSegments?.has("local") && (

diff --git a/web/src/shell/Monaco.tsx b/web/src/shell/Monaco.tsx index 6d5f9f9c8..da4460d26 100644 --- a/web/src/shell/Monaco.tsx +++ b/web/src/shell/Monaco.tsx @@ -79,7 +79,7 @@ export const Monaco = ({ dynamicHeight = false, alwaysRecenter = true, lineNumberTransform, - setBreakpoints + setBreakpoints, }: { value: string; onChange: Action; @@ -106,18 +106,18 @@ export const Monaco = ({ const [instance, setInstace] = useState(); const [b, setB] = useState(false); const bCallback = useCallback((breakpoints: number[]) => { - console.log('breakpointChanged: ', breakpoints); - if(setBreakpoints!==undefined){ + console.log("breakpointChanged: ", breakpoints); + if (setBreakpoints !== undefined) { setBreakpoints(breakpoints); } }, []); useEffect(() => { if (instance && !b) { - console.log("add callback for breakpoints") - instance.on('breakpointChanged', bCallback) + console.log("add callback for breakpoints"); + instance.on("breakpointChanged", bCallback); setB(true); } - }, [instance, bCallback]) + }, [instance, bCallback]); const codeTheme = useCallback(() => { const isDark = theme === "system" @@ -187,7 +187,7 @@ export const Monaco = ({ const onMount: OnMount = useCallback( (ed, mon) => { if (instance === undefined) { - setInstace(new MonacoBreakpoint({ editor: ed })) + setInstace(new MonacoBreakpoint({ editor: ed })); } monaco.current = mon; editor.current = ed; diff --git a/web/src/shell/editor.tsx b/web/src/shell/editor.tsx index b7162b71a..cdd7ff9d3 100644 --- a/web/src/shell/editor.tsx +++ b/web/src/shell/editor.tsx @@ -77,7 +77,7 @@ export const Editor = ({ dynamicHeight = false, alwaysRecenter = true, lineNumberTransform, - setBreakpoints + setBreakpoints, }: { className?: string; style?: CSSProperties; @@ -94,7 +94,7 @@ export const Editor = ({ dynamicHeight?: boolean; alwaysRecenter?: boolean; lineNumberTransform?: (n: number) => string; - setBreakpoints?: (n:number[]) => void + setBreakpoints?: (n: number[]) => void; }) => { const { monaco } = useContext(AppContext); @@ -119,7 +119,6 @@ export const Editor = ({ alwaysRecenter={alwaysRecenter} lineNumberTransform={lineNumberTransform} setBreakpoints={setBreakpoints} - /> ) : (