Skip to content

Breakpoint directive

zero-plusplus edited this page Dec 9, 2021 · 7 revisions

breakpoint-directive

See Debug directive for notes.

This directive breaks the script at the position. It can also be used as an advanced breakpoint.

Compared to breakpoint set in the UI, it is easier to move position and duplicate them. Also when sharing a script in a question or bug report, etc., you can also share the position where the script breaks.

Syntax

This directive has the following syntax.

# Capitalization indicates the part that can be setting
# Only spaces are allowed before directive comment

; @Debug-Breakpoint(CONDITION)[HITCONDITION] => MESSAGE
  • CONDITION - See Conditional breakpoint
  • HITCONDITION - See Hit conditional breakpoint
  • => - Output operator
    • -> - Outputs the MESSAGE as it is
    • => - A line feed code is placed at the end of the MESSAGE
    • ->| or =>| - The same as for each operator, but it suppresses the automatic removal of leading whitespace
  • MESSAGE - See Log point's Embedding value

Everything after @Debug-Breakpoint is optional. The following is an example of a valid directive.

; @Debug-Breakpoint
; @Debug-Breakpoint(true)
; @Debug-Breakpoint("name" in person) => {person.name}
; @Debug-Breakpoint[% 10] => {A_Index}
; @Debug-Breakpoint("name" in person)[% 10] => {A_Index}: {person.name}
Clone this wiki locally