Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

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

Posted on by 34
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
 
Categories:
  • yaza Profile Picture
    yaza 34 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 64,622 Super User 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,613 User Group Leader 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 8,080 User Group Leader 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 5,353 Super User 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

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,768 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,985 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans