Breakpoints
Breakpoints in Bash scripts work just like any other type of breakpoint in your IDE.
Only line breakpoints are supported. You can not set breakpoints on empty lines.
A breakpoint is only stopping execution for the first instruction on a line. You can’t step over multiple instructions on the same line.
How to Set Breakpoints
The easiest way to set a new breakpoint is to use the gutter on the left:
![Bash script without breakpoint](/pngs/debugger/no-breakpoint.zh-cn_400.41a4597bbfd88d968162950779ff6905.png)
Click into the empty space on the left. Now the new breakpoint is displayed like this:
![Bash script with a breakpoint](/pngs/debugger/breakpoint-stopped.zh-cn_400.f32da2a8afa31a14c265b6510f62adcb.png)
Once you start the debugger, an active breakpoint displays an additional check mark:
![Bash script with an active breakpoint](/pngs/debugger/breakpoint-active.zh-cn_400.5671192552f6746b0ad81854abab9bfa.png)
How to Remove Breakpoints
You can just click on the breakpoint icon to remove it. Alternatively, you can use the breakpoint settings dialog to manage all breakpoints at once.
Conditional Breakpoints
A conditional breakpoint only stops the execution when the conditional evaluates to true.
To set a condition on a breakpoint:
- Right–click on the breakpoint icon
- Enter the condition into the text input field
- Close the popup to apply the settings
![How to configure a conditional breakpoint in BashSupport pro](/pngs/debugger/breakpoint-conditional.zh-cn_400.425ab36c269dd085fb2c394cae70e57a.png)
A conditional breakpoint is marked with a question mark:
![](/pngs/old/debugger/conditional-symbol_400.be9a3163b8cd76f8b3db3eb480dfab9e.png)
An active, conditional breakpoint is marked with an additional check mark:
![](/pngs/old/debugger/active-conditional-symbol_400.58c53223cf91b25d8d76987a5ffbeeaa.png)
- Examples of conditional breakpoints
- The script stops at the breakpoint when the condition evaluates to
true
(i.e.0
). Here are a few examples:
|
|
![Conditional breakpoints in BashSupport Pro](/pngs/debugger/demo-conditional.zh-cn_400.39f0d2acebf9d6b9bbeb8d13d935859d.png)
Temporary Breakpoints
A temporary breakpoint is removed as soon as it’s hit.
- Right-click on a breakpoint
- Mark the checkbox Remove after first hit (temporary breakpoint)
![A temporary breakpoint in BashSupport Pro](/pngs/debugger/breakpoint-temporary.zh-cn_400.4e9d6f46de1d29e58c9147490ca7766a.png)
Breakpoint Settings
Your IDE provides a list of the breakpoints. This dialog also allows you to configure the properties of each breakpoint.
![Breakpoint settings dialog](/pngs/debugger/breakpoint-settings.zh-cn_400.26825ee75ad8c535f7cc9d5ae7d1a6b4.png)