Al: Breakpoints in debug mode get disabled on Case statements

Created on 16 Aug 2020  Â·  9Comments  Â·  Source: microsoft/AL

Describe the bug
When adding breakpoints in one of my projects it all looks fine (red dots are added in VS Code).
However when I hit publish with debugging, the red dots become dark circles and if I try to add other breakpoints it shows me an error (it also shows it when the BC session starts for each breakpoint added)
"Unverified breakpoint"
"Error: It is not possible to add a breakpoint at line number x in application object type CodeUnit, ID y"

The code also doesn't stop on these breakpoints

To Reproduce
please see above
AL Code to reproduce the issue

Expected behavior
I would expect the code to stop on my breakpoints.

Screenshots
image
image

5. Versions:

  • AL Language: 5.0.312966

  • Business Central: docker container as per below
    Version: NZ Business Central 16.3 (Platform 16.0.14073.15236 + Application 16.3.14085.15266)
    Azure AD tenant: common, Environment: Sandbox (Sandbox)
bug debugger input-needed

Most helpful comment

This is a long standing and known issue: #5597

There's been other mentions of it within the repo

All 9 comments

It seems the problem is when adding breakpoints on or inside case statements and I am not the only one who had this.
A colleague tried it too and even when it works, it doesn't stop on the line you add the breakpoint, so it's a common issue.
I placed a breakpoint outside and it worked, let me know if you can release a fix in AL or if it is a VS Code issue?

Cheers,
Robert

Hi! Can you provide a project to reproduce this and a video/screenshot with the breakpoints placed?

Hi Alexandru,

Please find the screendumps of a sample hello world created with AL:GO with a simple Case function.
You will see that if you place a breakpoint on the Case instruction it won't stop there.
It also turns into a dark circle from a red dot and shows this error:
[2020-08-19 08:54:42.26] Error: It is not possible to add a breakpoint at line number 10 in application object type PageExtension, ID 50100.
Printscreens below.
Cheers,
Robert

image
image
image
image

Thank you!

This is a long standing and known issue: #5597

There's been other mentions of it within the repo

I think this has been fixed. But as far as I know it required a server fix, so I do not know if it will be available on 17.X only or whether it has been backported to 16.X

been fixed. But as far as I know it requ

That's great news, is this mentioned anywhere by Microsoft?
Would be great to see if it's backported or when it is planned for release? I suppose 2020 Wave2, but if it's backported, then maybe earlier?

Cheers,
Robert

@robertosb, can you give it a try in our latest developer preview? This issue has been fixed and was backported to 16.x too. #5597 provides more information about it, as they seem to be reporting the same issue.

I am closing this issue because it appears that it has been resolved. Please open a new issue if you believe this has not been resolved and reference the current issue.

Was this page helpful?
0 / 5 - 0 ratings