NonDebuggable Attribute
Version: Available or changed with runtime version 2.0.
Specifies that the annotated symbol will not be available to the debugger. E.g. methods can't be stepped through and variables can't be inspected.
Applies To
- Variable
- Method
Syntax
[NonDebuggable]
Example
Setting the attribute on a method. Each method must be marked with [NonDebuggable]
.
codeunit 50142 NoDebuggingOfMethod
{
[NonDebuggable]
local procedure MyProcedure()
var
myInt: Integer;
begin
//Make something happen
end;
}
Setting the attribute on variables. Each variable must be marked as [NonDebuggable]
.
codeunit 50143 NoDebuggingOfVar
{
local procedure MyProcedure()
var
[NonDebuggable]
myInt: Integer;
begin
//Make something happen
end;
}
Remarks
Regardless of the resource exposure policy setting, methods and variables marked with the [NonDebuggable]
attribute, will remain non-debuggable.
Note
During snapshot debugging, all frames are collected, also for non-debuggable methods, but no variables are shown in any of the snap points for methods that are decorated as non-debuggable.
For more information, see Resource Exposure Policy Setting.
See also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈