---
id: post/yzhums-com/64942
type: post
title: "Dynamics 365 Business Central: How to set a condition on a breakpoint in debugging (Conditional breakpoints)"
summary: Conditional breakpoints allow developers to pause code execution only when specified conditions are met during AL debugging in Business Central. This feature lets you filter breakpoints by variable or field values, reducing unnecessary pauses and focusing debugging efforts on specific scenarios.
tier: community
language: en
tags:
  - debugging
  - breakpoints
  - al language
  - visual studio code
  - conditional execution
  - development tools
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-26T06:41:41.779Z"
  flags: []
generated:
  at: "2026-10-26T05:51:10.938Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 3f6964e2f56dc830ebba44c0f171c607969f04da585d49889247704c97acd7fc
evidence:
  - kind: blog
    url: https://yzhums.com/64942/
    title: "Dynamics 365 Business Central: How to set a condition on a breakpoint in debugging (Conditional breakpoints)"
    date: "2025-11-06"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://yzhums.com/64942/
    title: "Dynamics 365 Business Central: How to set a condition on a breakpoint in debugging (Conditional breakpoints)"
    date: "2025-11-06"
    commit: null
    t: null
    quote: If the condition evaluates as true, then code execution breaks at the breakpoint. If the condition is false, then code execution continues.
  - kind: blog
    url: https://yzhums.com/64942/
    title: "Dynamics 365 Business Central: How to set a condition on a breakpoint in debugging (Conditional breakpoints)"
    date: "2025-11-06"
    commit: null
    t: null
    quote: The condition can include any variables or fields that are currently in scope.
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "64942"
source_id: yzhums-com
source_name: Dynamics 365 Lab - Yun Zhu
url: https://yzhums.com/64942/
published_at: "2025-11-06T00:52:46.000Z"
author: Yun Zhu
full_text: false
words: 698
quotes:
  - text: If the condition evaluates as true, then code execution breaks at the breakpoint. If the condition is false, then code execution continues.
    why_it_matters: Clarifies the fundamental behavior of conditional breakpoints and how they filter execution pauses based on true/false evaluation.
  - text: The condition can include any variables or fields that are currently in scope.
    why_it_matters: Defines the scope of what can be used in conditions, showing flexibility in debugging complex scenarios with multiple variables and fields.
code_objects_mentioned: []
systems:
  - development
  - platform
versions_mentioned:
  - version 26
  - Business Central 2023 wave 2
  - Business Central 2023 wave 1
  - Business Central 2022 wave 2
preview:
  embeddable: true
  frame_url: null
  image: https://yzhums.com/wp-content/uploads/2025/11/Snipaste_2025-11-05_14-24-53.png
  image_alt: null
  image_w: null
  image_h: null
  site_name: Dynamics 365 Lab
  favicon: https://yzhums.com/wp-content/uploads/2020/08/cropped-logo-3-32x32.png
  probed_at: "2026-10-26T06:12:26.574Z"
---

# Dynamics 365 Business Central: How to set a condition on a breakpoint in debugging (Conditional breakpoints)

[Read the post](https://yzhums.com/64942/) · Dynamics 365 Lab - Yun Zhu (Yun Zhu, MVP) · 2025-11-06 · 698 words · tier community · reviewed (checked by Opus)

> Conditional breakpoints allow developers to pause code execution only when specified conditions are met during AL debugging in Business Central. This feature lets you filter breakpoints by variable or field values, reducing unnecessary pauses and focusing debugging efforts on specific scenarios.

## Key points

- Add a conditional breakpoint by right-clicking the editor margin, or edit an existing breakpoint, then enter an expression in the inline dialog.
- Execution stops only when the expression is true, for example Rec."No." equal to a specific posted sales invoice number.
- Literal comparisons work with simple types such as Integer, Decimal, Code, Text, Boolean, Option and Enum; arrays, lists, dictionaries, record fields and variants need version 26 or later.
- Comparison operators are always available, while numeric negation, NOT and AND/OR with parentheses arrive in version 26.
- Clearing the condition turns the breakpoint back into a normal one.

## Quotes

- "If the condition evaluates as true, then code execution breaks at the breakpoint. If the condition is false, then code execution continues." (Clarifies the fundamental behavior of conditional breakpoints and how they filter execution pauses based on true/false evaluation.)
- "The condition can include any variables or fields that are currently in scope." (Defines the scope of what can be used in conditions, showing flexibility in debugging complex scenarios with multiple variables and fields.)

## Context

- Features: conditional breakpoints, AL debugger, expression evaluation
- Versions: version 26, Business Central 2023 wave 2, Business Central 2023 wave 1, Business Central 2022 wave 2

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
