Skip to content

Commit

Permalink
Extra Column - Sierra Debug Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jaipaljadeja committed Apr 24, 2024
1 parent 5923b4a commit 1d147ba
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions components/Editor/ExtraColumn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { Editor as MonacoEditor, Monaco } from '@monaco-editor/react'
import { editor } from 'monaco-editor'

import { CodeType } from '../../context/appUiContext'
import { CairoVMApiContext } from '../../context/cairoVMApiContext'
import {
CairoVMApiContext,
ProgramDebugMode,
} from '../../context/cairoVMApiContext'
import { cn } from '../../util/styles'

import Header from './Header'
Expand Down Expand Up @@ -35,6 +38,8 @@ const ExtraColumn = ({
sierraStatements,
casmToSierraProgramMap,
currentSierraVariables,
debugMode,
sierraSubStepIndex,
} = useContext(CairoVMApiContext)

return (
Expand All @@ -60,7 +65,17 @@ const ExtraColumn = ({
instructions={sierraStatements}
codeType={codeType}
activeIndexes={
casmToSierraProgramMap[activeCasmInstructionIndex] ?? []
casmToSierraProgramMap[activeCasmInstructionIndex]
? debugMode === ProgramDebugMode.Sierra
? sierraSubStepIndex !== undefined
? [
casmToSierraProgramMap[activeCasmInstructionIndex][
sierraSubStepIndex
],
]
: []
: casmToSierraProgramMap[activeCasmInstructionIndex]
: []
}
errorIndexes={
casmToSierraProgramMap[errorCasmInstructionIndex] ?? []
Expand Down

0 comments on commit 1d147ba

Please sign in to comment.