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 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應