5.4 Executing Code to a Specific Location


To debug your program up to a specific line in your source code, set a breakpoint at the line that you want to run up to (click in the line and press the F9 function key). Then begin debugging by doing the following:

  1. Make sure that the Enable Breakpoints button Button Enable Breakpoints 90.png on the Debug toolbar (or the Debug:Enable Breakpoints menu command) is selected.
  2. Call your function from Code Builder's LabTalk Console or from Origin.
    The program will run up to the line containing the breakpoint.
  3. While still in Debug mode set another breakpoint (click in the line and press the F9 function key) several lines beneath the first breakpoint and then click the Go button Button Go 90.png on the Debug toolbar again.
    The program will run up to the line containing the second breakpoint.

To continue debugging, you can step through your code line by line by clicking the Step Into button Button Step Into 90.png on the Debug toolbar (or by selecting the Debug:Step Into menu command). You can also step over or out of a function. See the next section for more information on the Step Into, Step Over, and Step Out buttons.