File tree Expand file tree Collapse file tree
haskell-debugger/GHC/Debugger
hdb/Development/Debug/Adapter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -342,6 +342,13 @@ runDebugger l rootDir compDir libdir units ghcInvocation' extraGhcArgs mainFp co
342342 mainGhcThread :: Ghc a
343343 mainGhcThread = do
344344 -- Initializes interpreter!
345+ -- FIXME: Do these affect affect the loading of the debugee code? and which ones are required?
346+ --
347+ -- I guess these are important for it to be debuggable?
348+ -- `GHC.gopt_set` GHC.Opt_IgnoreOptimChanges
349+ -- `GHC.gopt_set` GHC.Opt_IgnoreHpcChanges
350+ -- `GHC.gopt_set` GHC.Opt_UseBytecodeRatherThanObjects
351+ -- `GHC.gopt_set` GHC.Opt_InsertBreakpoints
345352 _ <- GHC. setSessionDynFlags dflags2
346353
347354 -- Initialise plugins here because the plugin author might already expect this
Original file line number Diff line number Diff line change @@ -142,8 +142,11 @@ initDebugger l supportsRunInTerminal preferInternalInterpreter
142142 | otherwise -> mempty
143143
144144 liftIO (runExceptT (hieBiosSetup hieBiosLogger projectRoot entryFile)) >>= \ case
145- Left e -> throwError $ InitFailed e
146- Right (Left e) -> lift $ terminateWithError e
145+ -- FIXME: why are these errors handled differently?
146+ Left e -> throwError $ InitFailed e -- errors while checking ghc version
147+ -- FIXME: will crash calling destroyDebugSession, since we haven't registered one yet.
148+ Right (Left e) -> lift $ terminateWithError e -- errors while getting flags.
149+
147150 Right (Right flags) -> do
148151
149152 let
You can’t perform that action at this time.
0 commit comments