Breakpoints

Old Content - visit altium.com/documentation

The following content has been imported from Legacy Help systems and is in the process of being checked for accuracy.

Function

The Breakpoints panel provides information on all breakpoints that are currently defined in all open script files (irrespective of the parent script project (*.PrjScr) they belong to), as well as providing commands for adding, enabling, disabling and deleting selected breakpoints as required.

Content and Use

Any breakpoints that are currently defined in any open script documents (*.pas, *.vbs, *.js, *.tcl, *.bas) will be listed in the panel. For each breakpoint entry, the following information is available:

  • Module name - the name of the script file (including path) in which the breakpoint resides
  • Line - the line number within the script document at which the breakpoint has been placed
  • Condition - any specific condition defined for the breakpoint. If a condition has been specified, the breakpoint is referred to as a 'conditional breakpoint', whereby execution of the script will only halt if the condition returns true, otherwise execution will proceed unchecked.

A small icon to the left of the Module name is used to indicate the status of the breakpoint:

-

Breakpoint currently enabled

-

Breakpoint currently disabled

The icons used to mark breakpoints on the source code document itself are slightly different:

  • Enabled breakpoint - indicated in the code by a red highlight over the breakpoint line and a red circle with a cross in the margin
  • Disabled breakpoint - indicated in the code by a green highlight over the breakpoint line and a green circle with a cross in the margin


Double-clicking on a breakpoint entry in the panel will make the associated script document the active document in the design editor window, placing the text cursor at the beginning of the line of script to which the breakpoint applies.

Right-click Menu

When you select a breakpoint entry in the panel and right-click, a pop-up menu will appear providing the following commands:

  • Enable - toggle the state of the selected breakpoint between enabled and disabled
  • Delete - delete the selected breakpoint
  • View Source - make the associated script document, in which the selected breakpoint resides, the active document in the design editor window
  • Edit Source - make the associated script document, in which the selected breakpoint resides, the active document in the design editor window and place the text cursor at the beginning of the line, ready for editing

  • Properties - access the Breakpoint Properties dialog for the selected breakpoint entry.

You can use this dialog to change the state of the breakpoint (enable/disable it) and also add/modify a condition for the breakpoint as required. You cannot change the file in which the breakpoint has been added, nor the specific line number within that file.

  • Breakpoints sub-menu - provides access to the Add, Delete All, Disable All and Enable All commands listed below

When you right-click in the panel - away from breakpoint entries - a pop-up menu will appear providing the following commands:

  • Add - use this command to access the Add New Breakpoint dialog.

Use the dialog to define in which of the open script documents (listed under the File Name drop-down) and at what line number within that document, a new breakpoint should be added. You can also define a condition for the breakpoint and its initial state when placed - enabled or disabled. After defining the breakpoint as required, clicking OK will add the breakpoint to the designated document. The Breakpoints panel will be updated accordingly, with a new entry added at the bottom of the existing list of entries.

  • Delete All - delete all currently defined breakpoints listed in the panel
  • Disable All - change the current state of all breakpoints listed in the panel to disabled
  • Enable All - change the current state of all breakpoints listed in the panel to enabled

Notes

  • A breakpoint tells the Script Interpreter to pause its execution of a script at a particular line. Include a breakpoint in your script when you wish to halt execution at a particular point. A typical use of breakpoints would be in the different branches of a conditional statement, where a breakpoint is inserted into each branch to check which one is executed.
  • Enabled breakpoints can be added directly to a source script document by clicking in the right-hand margin, next to the line that you wish to apply a breakpoint to. Clicking again will remove the breakpoint. Alternatively, use the Toggle Breakpoint command, available from the Run menu or Script Debug toolbar. The Breakpoints panel will update accordingly.
  • A disabled breakpoint remains defined but will not cause a running script to halt when encountered.
  • A disabled breakpoint cannot be removed directly from the script document - neither by clicking in the right-hand margin nor by using the Toggle Breakpoint command. In the disabled state, deletion is only possible from the Breakpoints panel.
  • Any breakpoints that are set on non-statement lines of the script (e.g. blank lines, commented lines, etc) will, although displayed as valid and listed as enabled (or disabled) in the Breakpoints panel, be treated as invalid by the Script Interpreter and therefore ignored.
  • The keyboard shortcuts Up Arrow (or Left Arrow), HOME, END and Down Arrow (or Right Arrow), can be used to select the previous, first, last and next breakpoint entry, respectively.
  • You can change the order in which columns are displayed. To move a column, click on its header and drag it horizontally to the required position. A valid position is indicated by the appearance of two green positional arrows.
  • To continue execution of a program that has been halted at a breakpoint, use the Run command, available from the Run menu or Script Debug toolbar (shortcut F9), or use the single stepping commands.

See Also

You are reporting an issue with the following selected text and/or image within the active document:
ALTIUM DESIGNER FREE TRIAL
Altium Designer Free Trial
Let’s get started. First off, are you or your organization already using Altium Designer?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

In that case, why do you need an evaluation license?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Got it. You actually don’t need an evaluation license for that.

Click the button below to download the latest Altium Designer installer.

Download Altium Designer Installer

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Please fill out the form below to get a quote for a new seat of Altium Designer.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

If you are on Altium Subscription, you don’t need an evaluation license.

If you are not an active Altium Subscription member, please fill out the form below to get your free trial.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Why are you looking to evaluate Altium Designer?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

You came to the right place! Please fill out the form below to get your free trial started.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Sounds exciting! Did you know we offer special discounted student licenses? For more information, click here.

In the meantime, feel free to request a free trial by filling out the form below.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.

Please fill out the form below to request one.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

That’s great! Making things is awesome. We have the perfect program for you.

Upverter is a free community-driven platform designed specifically to meet the needs of makers like you.

Click here to give it a try!

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.

Please fill out the form below to request one.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.