Skip to main content

Notifications

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

It is not possible to add a breakpoint at line number in visual studio code

(1) ShareShare
ReportReport
Posted on by 38
When I try to debug bc in visual studio code I get this error:
 Error: It is not possible to add a breakpoint at line number 428 in application object type CodeUnit, ID 50417. Check that the resource exposure policies applied to this extension allows debugging.
 
Am I missing rights? 
 
Gr. Youssef
 
  • gdrenteria Profile Picture
    gdrenteria 13,653 Most Valuable Professional on at
    It is not possible to add a breakpoint at line number in visual studio code
  • ERPlatanos Profile Picture
    ERPlatanos 67 on at
    It is not possible to add a breakpoint at line number in visual studio code
    Has anybody figured this out yet?
    I'm having the same issue
  • yaza Profile Picture
    yaza 38 on at
    It is not possible to add a breakpoint at line number in visual studio code
    I also added this to my app.js:
    "resourceExposurePolicy": {
        "allowDebugging": true,
        "allowDownloadingSource": true,
        "includeSourceInSymbolFile": true
      },
     
    Still getting the error.
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 76,909 Super User 2025 Season 1 on at
    It is not possible to add a breakpoint at line number in visual studio code
    More details: Business Central 2021 wave 2 (BC19): Richer access control for extension source in cloud environments (‘showMyCode’ -> ‘resourceExposurePolicy’)
     
     
    Thanks.
    ZHU
  • Suggested answer
    Saurav.Dhyani Profile Picture
    Saurav.Dhyani 14,178 Super User 2025 Season 1 on at
    It is not possible to add a breakpoint at line number in visual studio code
    Hi,
     
    Is the object part of your extension?
     
    If yes, then you should be able to debug the object and also able to set breakpoint.
     
    Refer this video for debugging - https://youtu.be/TgXNXxKL2yc
     
    Regards,
    Saurav Dhyani
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 13,406 Super User 2025 Season 1 on at
    It is not possible to add a breakpoint at line number in visual studio code
    Hi @yaza,
     
    you must ensure that the allowDebugging property has the value true in the app.json file.
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • gdrenteria Profile Picture
    gdrenteria 13,653 Most Valuable Professional on at
    It is not possible to add a breakpoint at line number in visual studio code
    Hi
    I hope this can help you and give you some hints. 
    allowDebugging setting.
    BR
    GR

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…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,842 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans