Setting a Breakpoint

In the Source panel:

  1. Choose File > Open... to open the source file, or switch to an already open source file using the option menu above the Source panel.

    Note: File > Open is not available until you open a project. Do this by double-clicking any project in the Project card.

  2. Scroll, or choose Search > Find..., to find the point in the file where you want to set the breakpoint.

  3. Place the cursor next to the line of source code in the column to the left of the source code.

  4. Click the left mouse button to set the breakpoint.

    The line of source code is highlighted and a round icon appears in the column to the left of the source code. A breakpoint indicator also appears in the scroll bar to the right of the source code.

  5. Click the Run button to run the program.

    When the breakpoint is reached, the thread that encounters it is made the current thread, and all threads in your program are suspended.

-or-

In the Command card:

  1. Identify the file, class, or method in which you want to set a breakpoint.

  2. Type in one of the following stop commands to set a breakpoint:

    stop at class:line

    stop at file file.java:line

    stop at line

    stop in class:method

-or-

In the menu bar:

  1. Choose Debug > Create Breakpoint... to open the Breakpoints dialog.

  2. Choose Source, Method, or Exception breakpoint from the option menu.

  3. Enter the line number, class or method information.

  4. Click OK.

Notes

See Also

Guide to the Cosmo Code Development Environment
12-96*241