Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Can’t add breakpoints in Visual Studio Code

(1) ShareShare
ReportReport
Posted on by 16
I suddenly lost the ability to add breakpoints to my AL code in Visual Studio Code.  Any ideas what it might be? 
 
>\[2025-02-12 15:35:42.11\] Error: It is not possible to add a breakpoint at line number 23 in application object type PageExtension, ID 50101. Check that the resource exposure policies applied to this extension allows debugging.
I've tried a new project (HelloWorld), built a brand new sandbox to try, checked my user permissions in Business Central, checked my app.json, and a couple of other things.    

These settings are restored from files when breakpoints worked so I'm pretty sure these are correect.  Here's part of what I have in the app.json:
    {    
        "version": "1.0.0.0",
        "brief": "",
        "description": "",
        "privacyStatement": "",
        "EULA": "",
        "help": "",
        "url": "",
        "logo": "",
        "screenshots": [],
        "platform": "1.0.0.0",
        "application": "25.3.28755.29171",
        "idRanges": [
            {
                "from": 50100,
                "to": 50149
            }
        ],
        "resourceExposurePolicy": {
            "allowDebugging": true,
            "allowDownloadingSource": true,
            "includeSourceInSymbolFile": true
        },
        "runtime": "14.0",
        "features": [
            "NoImplicitWith"
        ],
        "dependencies": [
        {
            "id": "437dbf0e-84ff-417a-965d-ed2bb9650972",
            "publisher": "Microsoft",
            "name": "Base Application",
            "version": "25.3.0.0"
        }
    ]
    }
 This is my launch.config
    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Your own server",
                "request": "launch",
                "type": "al",
                "environmentType": "Sandbox",   
                "startupObjectId": 22,
                "startupObjectType": "Page",
                "breakOnError": "All",
                "launchBrowser": true,
                "enableLongRunningSqlStatements": true,
                "enableSqlInformationDebugger": true,
                "usePublicURLFromServer": true
            },
            {
                "name": "AL: Generated Download Symbols request",
                "request": "launch",
                "type": "al",
                "environmentType": "Sandbox",
                "environmentName": "PixelPulse_Sandbox"
            },
            {
                "name": "AL: Generated Attach request",
                "request": "attach",
                "type": "al",
                "environmentType": "Sandbox",
                "environmentName": "PixelPulse_Sandbox",
                "sessionId": 7042,
                "breakOnNext": "WebClient",
                "breakOnError": "ExcludeTry"
            }
        ]
    }
  • gdrenteria Profile Picture
    gdrenteria 14,174 Most Valuable Professional on at
    Can’t add breakpoints in Visual Studio Code
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 77,515 Super User 2025 Season 1 on at
    Can’t add breakpoints in Visual Studio Code
    I just tested it and there is no problem. The following is my Launch.json, I hope it can give you some hints.
     
    Thanks.
    ZHU
  • Suggested answer
    Saurav.Dhyani Profile Picture
    Saurav.Dhyani 14,279 Super User 2025 Season 1 on at
    Can’t add breakpoints in Visual Studio Code
    Hi,
     
    Hope this video helps you with Debugging Business Central.
     
     
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    Khushbu Rajvi. 8,252 Super User 2025 Season 1 on at
  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 44,123 on at
    Can’t add breakpoints in Visual Studio Code
    You have allowdebugging to true, sometimes I ran into this issue but when I try to reload the vscode or restart it, it will allow me again. So try to restart the vscode.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,286 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,064 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans