When I try to set a breakpoint in a small Plutus project such as this, I always get the following error:

:b Week05.Homework1.mkPolicy
cannot set breakpoint on Week05.Homework1.mkPolicy: module Week05.Homework1 is not interpreted

(Using Windows, cabal version, ghc version 8.10.4.)

Removing -fobject-code or adding -fPIC to the ghc-options won't help, which was suggested here for other Haskell projects. -fPIC does even fail as it is not a Windows thing, anyway.

The error is the same for off- and on-chain functions. So the INLINABLE pragma is not to blame.

Does this have anything to do with the PlutusTx compiler?

  • This may have to do with Haskell being a functional language. Meaning that unlike imperative languages, there are no 'breakpoints' due to the nature of the language. The other link you mentioned only works with I/O operations which follow an 'imperative' style. The answer for your question would be to find a new way to debug functional programs, seeing as they don't work with imperative style debugging.
    – CosmicCat
    May 25, 2021 at 0:49

1 Answer 1


mkPolicy is an on-chain validator code, is lifted to template Haskell and it gets compiled to core plutus and executed when the UTXO locked by that script is spent. AFAIK, core-plutus is not Haskell, so the breakpoint will be ignored.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.