Skip to main content

Notifications

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 61,962 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 11,228 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 4,808 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 3,574 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

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,623 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 224,463 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans