This plug-in supports debugging of Haskell modules using GHCi. That means that the features in this section are available only if the module is run within a GHCi session. To do this, right-click the module, and select Debug As > GHCi session.
You can add breakpoints in your code double-clicking in the left margin of the source code editor. A small blue circle will appear in the selected line. You can delete the breakpoint double-clicking one of those circles. Note that currently EclipseFP does not allow to set breakpoints in particular expressions, only in entire lines.
Once you start running functions in your module, it is recommended to change to the Debug perspective by going to the main menu and selecting Window > Open Perspective > Debug. This gives you access to the debugging tools.
When a breakpoint is reached, the expression being evaluated is shown with a different background in the code editor. You can step or continue using the buttons available in the Debug view.
You can also inspect the value of the variables in the Variables view. As withing GHCi,
variables that aren't yet evaluated are shown as _
.
EclipseFP does not support direct debugging of executables. However, you can simulate it following these steps:
main
and press the Enter key. This will
execute the main
function, which is the entry point of your application.