Skip to main content

Notifications

Announcements

No record found.

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

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

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 12,183 Most Valuable Professional on at
    It is not possible to add a breakpoint at line number in visual studio code
  • ERPlatanos Profile Picture
    ERPlatanos 185 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 73,696 Super User 2024 Season 2 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 17,965 Super User 2024 Season 2 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 9,559 Super User 2024 Season 2 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 12,183 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans