Breakpoints

A breakpoint is an interrupter of the debugging process. Set the breakpoint next to the string that you want to explore in more detail, and the Debugger will stop the execution at this point. This gives you the ability to see the actual state of code variables, look at the call stack, and find the reason of an issue.

Types of breakpoints

In the Debug Mode, you are faced with different types of breakpoints

  • Enabled breakpoint — the red dot in the editor's left margin. It stops the debugging before the execution of this string.

The enabled breakpoint


  • Disabled breakpoint — the gray dot in the editor's left margin. It is skipped during the execution of the Debugger.

The disabled breakpoint


  • Invalid breakpoint — the red empty circle in the editor's left margin. It is invalid in the current location. This may happen if the breakpoint, for instance, is set in another test method, or at this string, there is no information for the debugging.

The invalid breakpoint


All the breakpoints are available in the Breakpoints panel.

Setting breakpoints

You have the ability to set the breakpoints before debugging as well as when you are already running the Debugger. You can do this in three ways:

  • click on the editor's left margin next to the line, where you want to stop the debugging,
  • place the cursor at the necessary line and press the Cmd+\ hotkey,
  • use the context menu: place the cursor at the necessary line and select the New Breakpoint or Toggle Breakpoint option.

Enabling / Disabling breakpoints

The ability to enable or disable the breakpoints helps you to flexibly manage them. You can disable a breakpoint that you don't need to hit in the current execution but you still wish to leave it visible to have the ability to back to it later. You can do this by:

  • unchecking the box next to breakpoint in the Breakpoints panel,
  • using the Enable / Disable breakpoint button Enable / Disable Breakpoint button in the Breakpoints panel,
  • using the context menu of the breakpoint in the editor,

Disabling the breakpoint from the context menu


  • using the Main Menu: Run ⇒ Enable / Disable Breakpoint,

Disabling the breakpoint from the Main menu


  • using the context menu of the breakpoint in the Breakpoints panel,

Disabling the breakpoint from the context menu in the panel


  • pressing the Alt+Cmd+/ hotkey, when the cursor is placed on the line with the breakpoint.

In addition, you can disable all the breakpoints with a few clicks: go to the Main Menu ⇒ Run ⇒ Enable or Disable All Breakpoints.


Disabling all the breakpoints from the Main Menu


You can do the same from the context menu of the breakpoint in the editor: click on the breakpoint and select the Enable or Disable All Breakpoints.


Disabling all the breakpoints from the context menu


In addition, you can disable all the breakpoints from the context menu of the breakpoint in the Breakpoints panel or by using the Disable all breakpoints button Enable or Disable All Breakpoints button here.


Disabling all the breakpoints from the context menu in the panel


To enable a breakpoint or all the breakpoints, just do the same action one more time.

Deleting breakpoints

When you don't need the breakpoint and don't want to interrupt the debugging process at this step, you can easily delete this breakpoint by one of the following ways:

  • click on the breakpoint in the editor's left margin,
  • mark the unnecessary breakpoint and click on the Delete selection button Delete selection button in the Breakpoints panel,
  • select Remove breakpoint from its context menu in the editor,

Deleting the breakpoint from the context menu


  • select the Delete option from the context menu of the breakpoint in the panel.

Deleting the breakpoint from the context menu in the panel


You can also delete all the breakpoints:

  • from the Main Menu: Run ⇒ Clear All Breakpoints,

Deleting all the breakpoints from the Main Menu


  • or select the Clear All Breakpoints option from the context menu of the breakpoint in the editor,

Deleting all the breakpoints from the context menu in the editor


  • or select the Clear All Breakpoints option from the context menu of the breakpoint or click on the Clear All BreakpointsClear All button in the Breakpoints panel.

Deleting all the breakpoints from the context menu in the panel

In this section:

This also may be useful:

Last modified: 2017/03/07 16:06

footer image