# 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
```al
[NonDebuggable]
```
## Example
Add `[NonDebuggable]` to each method that you want to hide from the debugger.
```al
codeunit 50142 NoDebuggingOfMethod
{
    [NonDebuggable]
    local procedure MyProcedure()
    var
        myInt: Integer;
    begin
        //Make something happen
    end;
}

```
Add `[NonDebuggable]` to each variable that you want to hide from the debugger.
```al
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 `[NonDebuggable]` remain unavailable to the debugger.
> NOTE
> Snapshot debugging collects frames for non-debuggable methods but doesn't show their variables at snap points.
See Resource Exposure Policy Setting<../devenv-security-settings-and-ip-protection>.
## Related information
AL method reference<../methods-auto/library>
../devenv-debugging

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/attributes/devenv-nondebuggable-attribute, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/attributes/devenv-nondebuggable-attribute/
