[Haskell-cafe] Re: GHCi debugger question

Peter Hercek phercek at gmail.com
Thu Jan 15 19:57:25 EST 2009


Galchin, Vasili wrote:
>        I have a collection of functions .. but no "main" function. I am
> reading "Step Inside the GHCi debugger" from Monad.Reader Issue 10 by 
> Bernie Pope. If I don't have a "main" function can I still use the ghci 
> debugger? (I tried to set a breakpoint on one of my functions but it 
> didn't work).

It does not matter you do not have main function, just start debugging
  whatever function you have e.g. by:
:step <yourFunctionName> <functionArg> ...

Setting breakpoints works too without main. Actually, I'm aware only
  of one thing which does not work without main. It is :main command.
  But that command does not seem to do much, looks like it only sets
  program arguments and calls main.


Peter.



More information about the Haskell-Cafe mailing list