How can I set a breakpoint when running ModelSim?

To set a breakpoint in ModelSim, the steps are:

  1. From the transcript subwindow in the ModelSim Main window, enter the command,
    view source
    This will result in the source window being displayed.


  2. In the Workspace subwindow in the ModelSim main window, select the module which contains the source code that you want to set a breakpoint in. 
    This will cause the source code for that module to be displayed in the source window.


  3. In the source window, select a number on the left side of the source window that represents the line number of an executable line of code. 
    A number will be blue if the line it corresponds to is executable. 
    A red quadrangle symbol will be displayed next to the number which indicates that you have set a breakpoint at that line of code. 
    When you run the simulation, the simulation will halt when it arrives at the the line of code that you have set a breakpoint for. 
    To remove the breakpoint, select the red quadrangle symbol.