-
Notifications
You must be signed in to change notification settings - Fork 5
Meta variable
zero-plusplus edited this page Dec 21, 2021
·
11 revisions
The debugger adapter may have more useful information than the AutoHotkey debugger.
Meta variable is a variable to access this information and is enclosed in curly brackets such as {hitCount}
to distinguish it from AutoHotkey variable.
It can be used for the following features.
Meta variables with some child elements can specify the child element as in {callstack[1].name}
.
If the type is an array, the index start with 1
, as in AutoHotkey. However, unlike that, "1"
, 0x1
, etc. are not available, only pure numbers are supported.
Name | Type | Description |
---|---|---|
{hitCount} |
number |
Hit count of Breakpoint. If the pause reason is not BREAKPOINT or HIDDEN BREAKPOINT , the value will be -1 .Removing a breakpoint will also discard the count. |
{elapsedTime_ns} {elapsedTime_ms} {elapsedTime_s}
|
number |
Note that this is not accurate by specification, Especially noticeable if you are using Advanced breakpoint. Also note that if you pause, the value will be -1 , as the exact execute time cannot be calculated.Time taken to execute. Each suffix indicates the unit of measurement: ns (nanosecond), ms (millisecond), s (second).
|
{now} |
string |
Current time. Same as {A_Year}-{A_Mon}-{A_MDay} {A_Hour}:{A_Min}:{A_Sec}.{A_MSec}
|
{variableCategories}
|
array |
By default, it can output Local and Global variables. The output depends on how the variableCategories attribute is specified.If you use {variableCategories[1]} , you can output only specific categories. In this case, Local will be output. However, it is not possible to specify variable as in {variableCategories[1].localVar} .
|
{callstack}
|
array | An array of objects with the following attributes. |
{callstack[INDEX].name} |
string |
It is similar to A_ThisFunc in that it represents the function name, and is slightly superior to the Auto Exec section because it does not return an empty string.Note that, the formatting is a little different, as in funcName() .
|
{callstack[INDEX].path} |
string | Full path of the file. |
{callstack[INDEX].line} |
number | Line of the file. |
{callStackNames}
|
array |
Array of callstack[INDEX].name .In other words, {callstackNames[1]} is the same as {callstack[1].name} .
|
{thisCallstack} |
array | Same as {callstackNames[1]} . |