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 免费试用
Altium Designer Free Trial
我们开始吧!首先,您或者您的公司已经在使用Altium Designer了吗?

如果您有任何需求,请点击这里联系获取当地办公室销售代表联系方式。.
Copyright © 2019 Altium Limited

既然您在使用Altium Designer,为何仍需要试用?

如果您有任何需求,请点击这里联系获取当地办公室销售代表联系方式。.
Copyright © 2019 Altium Limited

好的,实际上您无需下载一个试用版本。

点击下方按钮下载最新版本的Altium Designer安装包

下载Altium Designer 安装包

如果您有任何需求,请点击这里联系获取当地办公室销售代表联系方式。.
Copyright © 2019 Altium Limited

填写下方表格,获取Altium Designer最新报价。

点击[获取免费试用],并同意我们的隐私政策。您会接收到来自Altium的资讯,并允许其改变您的通知首选项。

如果您是Altium维保期内客户,您不需要下载试用版本。

如果您不是Altium维保客户,请填写下方表格免费试用。

点击[获取免费试用],并同意我们的隐私政策。您会接收到来自Altium的资讯,并允许其改变您的通知首选项。

您为何想要试用Altium Designer?

如果您有任何需求,请点击这里联系获取当地办公室销售代表联系方式。.
Copyright © 2019 Altium Limited

那您来对地方了!请填写下方表格申请试用吧。

点击[获取免费试用],并同意我们的隐私政策。您会接收到来自Altium的资讯,并允许其改变您的通知首选项。

听上去很棒!您知道我们为学生提供了特殊折扣么?欲知详情,请点击这里。.

同时,请填写下方表格申请免费试用吧。

点击[获取免费试用],并同意我们的隐私政策。您会接收到来自Altium的资讯,并允许其改变您的通知首选项。

好的,您可以下载免费的Altium Designer Viewer查看文档,有效期6个月。

请填写下方表格申请。

点击[获取免费试用],并同意我们的隐私政策。您会接收到来自Altium的资讯,并允许其改变您的通知首选项。

好棒!创作是一件超酷的事情,我们可以为您提供完美的设计软件。

Upverter是一个社区导向的交流平台,专为您这样的创客量身定做。

点击这里看看吧!

如果您有任何需求,请点击这里联系获取当地办公室销售代表联系方式。.
Copyright © 2019 Altium Limited

好的,您可以下载免费的Altium Designer Viewer查看文档,有效期6个月。

请填写下方表格申请。

点击[获取免费试用],并同意我们的隐私政策。您会接收到来自Altium的资讯,并允许其改变您的通知首选项。