AL icon indicating copy to clipboard operation
AL copied to clipboard

AL Debugging does not work

Open YashinaElena opened this issue 8 years ago • 15 comments

I updated Nav2018 to version Nav2018 CU2.Everything works except AL Debugging. After clicking F5 ; Microsoft (R) AL Compiler version 0.12.15355 Copyright (C) Microsoft Corporation. All rights reserved Success: The package is created. 2018-03-27 23:37:06.00] Sending request to http://localhost:7149/Test/dev/apps [2018-03-27 23:37:17.22] Success: The package has been published to the server. Page open in Explorer.But don't stop in breakpoints. My settings : NetFx40_LegacySecurityPolicy false launch.json "version": "0.2.0", "configurations": [ { "type": "al", "request": "launch", "name": "Your own server", "server": "http://localhost", "serverInstance": "test", "port": 7149, "authentication": "Windows",
"startupObjectId": 9006
} app.json { "id": "d3c55f67-262f-4a33-91c5-107a19a2b7a6", "name": "TestExtensions", "publisher": "Default publisher", "brief": "", "description": "", "version": "1.0.0.0", "compatibilityId": "1.0.0.0", "privacyStatement": "", "EULA": "", "help": "", "url": "", "logo": "", "capabilities": [], "dependencies": [], "screenshots": [], "platform": "11.0.0.0", "application": "11.0.20348.0", "showMyCode": true, "idRange": { "from": 50100, "to": 50149 } } Event System

  • Provider [ Name] Microsoft-DynamicsNAV-Common [ Guid] {E8077DE8-19F5-54B6-ABCA-708D7816893F} EventID 701 Version 2 Level 2 Task 33 Opcode 0 Keywords 0x8000f00000000001
  • TimeCreated [ SystemTime] 2018-03-28T06:37:05.028021600Z EventRecordID 865 Correlation
  • Execution [ ProcessID] 12520 [ ThreadID] 19948 Channel Microsoft-DynamicsNAV-Common/Admin Computer test.corp.test.de
  • Security [ UserID] S-1-5-21-253446912-1862989423-1837467894-6886
  • EventData instanceName test category Development clientSessionId {00000000-0000-0000-0000-000000000000} clientActivityId {00000000-0000-0000-0000-000000000000} serverSessionId {00000000-0000-0000-0000-000000000000} serverActivityId {00000000-0000-0000-0000-000000000000} eventTime 2018-03-28T06:37:05.012771500Z message Failed request -- Method:POST; Url:http://localhost:7149/test/dev/signalr/abort?clientProtocol=1.4&transport=webSockets&connectionData=[{"Name":"DebuggerHub"}]&connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAAsvKYWGvhrUmbH5%2F%2FT2K7CgAAAAACAAAAAAADZgAAwAAAABAAAADk%2BzLR7p%2F1QKeHiucosIavAAAAAASAAACgAAAAEAAAACbTRDZlnhH2GlUTJOOZUqY4AAAAG5fcYrLAofZQmeyQ%2Fyc6nQYmXRpdCWNQ5hYs%2F%2B9qNrBmYykReaf1ZeTBnIk%2BxwkX7f9ZcQGCUdQUAAAA7UWr3DBRP%2BFq2I2bFmgZLexAyWA%3D; StatusCode:NotFound; ReasonPhrase:Not Found; ResponseBody: {"Message":"No HTTP resource was found that matches the request URI 'http://localhost:7149/test/dev/signalr/abort?clientProtocol=1.4&transport=webSockets&connectionData=[{"Name":"DebuggerHub"}]&connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAAsvKYWGvhrUmbH5%2F%2FT2K7CgAAAAACAAAAAAADZgAAwAAAABAAAADk%2BzLR7p%2F1QKeHiucosIavAAAAAASAAACgAAAAEAAAACbTRDZlnhH2GlUTJOOZUqY4AAAAG5fcYrLAofZQmeyQ%2Fyc6nQYmXRpdCWNQ5hYs%2F%2B9qNrBmYykReaf1ZeTBnIk%2BxwkX7f9ZcQGCUdQUAAAA7UWr3DBRP%2BFq2I2bFmgZLexAyWA%3D'.","MessageDetail":"No route data was found for this request."} processId 12520 tag 00000LY threadId 65 counterInformation
    alternateTenantIds

YashinaElena avatar Mar 28 '18 07:03 YashinaElena

Is this a multi-tenant scenario? Is the breakpoint "red" after you have issued F5? This means that the server has actually accepted your breakpoints.

kalberes avatar Mar 28 '18 11:03 kalberes

Single tenant. BUT in event log I see this, although in Server Instance Setting Multitenant - false + System - Provider [ Name] MicrosoftDynamicsNavServer$maytoni365 - EventID 228 [ Qualifiers] 0 Level 4 Task 12 Keywords 0x80000000000000 - TimeCreated [ SystemTime] 2018-03-28T11:02:26.291889900Z EventRecordID 26830 Channel Application Computer de02-navision02.corp.maytoni.de Security - EventData Server instance: test Tenant: default Tenant 'default' from database 'test' on database server 'test\SQLNAV' has been mounted.

Breakpoint "red" always - before and after F5.

2018-03-28 14:23 GMT+03:00 Kálmán Béres [email protected]:

Is this a multi-tenant scenario? Is the breakpoint "red" after you have issued F5? This means that the server has actually accepted your breakpoints.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/AL/issues/1872#issuecomment-376852376, or mute the thread https://github.com/notifications/unsubscribe-auth/AiSvpY6wbUDs47f_JHToctWkNKow2OBDks5ti3KbgaJpZM4S-IeB .

YashinaElena avatar Mar 28 '18 12:03 YashinaElena

Hmm this beats me, without debugging it. Is there any breakpoint that you can hit?

kalberes avatar Mar 28 '18 15:03 kalberes

Did you enable debugging in the NAV Administration tool? image

r4luk avatar Mar 29 '18 08:03 r4luk

Yes.Enable Debugging - true

2018-03-29 11:14 GMT+03:00 r4luk [email protected]:

Did you enable debugging in NAV Administration tool? [image: image] https://user-images.githubusercontent.com/21063415/38077626-46a8d0fe-3342-11e8-8d63-80ee539dd965.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/AL/issues/1872#issuecomment-377158789, or mute the thread https://github.com/notifications/unsubscribe-auth/AiSvpRWGAS25E43k1J16vkNOy2Ztn7awks5tjJfrgaJpZM4S-IeB .

YashinaElena avatar Mar 29 '18 09:03 YashinaElena

We can confirm we still have this behaviour when working with Dynamics NAV 2018 CU3 - new AL debugger doesn't work. "Enable Debugging" is true against the service and "NetFx40_LegacySecurityPolicy" is false in *.config service file.

jakubhojnacki avatar Apr 06 '18 14:04 jakubhojnacki

Hi as mentioned, this must be a local problem else we would have zillions of issues logged here. The Enable Debugging is not needed for the new debugger. You invoke a breakpoint hit in the new debugger through the web client accessing your AL code. Are you sure that even if you create a page, set that page as the startupObjectId and set a breakpoint in the OnOpenPage nothing gets hit?

kalberes avatar Apr 06 '18 17:04 kalberes

No, I'm not sure. After switching on the multi-tenant and mounting the tenant, Default debugger is working, The debugger's work is unstable and I'm not sure that after the next update the situation will not happen again. In any case, thank you all for participating, the task is closed.

2018-04-06 20:27 GMT+03:00 Kálmán Béres [email protected]:

Hi as mentioned, this must be a local problem else we would have zillions of issues logged here. The Enable Debugging is not needed for the new debugger. You invoke a breakpoint hit in the new debugger through the web client accessing your AL code. Are you sure that even if you create a page, set that page as the startupObjectId and set a breakpoint in the OnOpenPage nothing gets hit?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/AL/issues/1872#issuecomment-379321603, or mute the thread https://github.com/notifications/unsubscribe-auth/AiSvpY_N7uGIhHCRiliSqLHfzFAmgtjvks5tl6WIgaJpZM4S-IeB .

YashinaElena avatar Apr 09 '18 06:04 YashinaElena

I've done a simple example with a page and a trigger and it doesn't work. The point is - we have it working for some environments and not working for others. Finding any reason or troubleshooting is pretty impossible. We are using NAV 2018 CU3, AL extension 0.15.18771. One thing we noticed is - when it doesn't work, all breakpoints appear as "unverified" (screenshot attached). Searching through VS Code forums hasn't brought anything useful. debugging

jakubhojnacki avatar Apr 11 '18 13:04 jakubhojnacki

You should not use AL 0.15 with NAV 2018. Please read the FAQ

StanislawStempin avatar Apr 11 '18 15:04 StanislawStempin

Thank you very much for your suggestion. I'm slightly puzzled, because the FAQ states I should use AL 0.12.xxx with NAV 2018 CU3. So that's what I've tried (the VSIX from the installation package; version 0.12.17720). Unfortunately, the result was exactly the same :-(. We are happy investigating and troubleshooting ourselves; we just don't know where to start - whether there is any log, event journal, trace, etc.

jakubhojnacki avatar Apr 12 '18 08:04 jakubhojnacki

I have just re-tested debugging with CU4 - using both CU4 AL extension (0.12.17720 - so it hasn't changed since CU3) and 365 BC one (0.15.18771). It doesn't work no matter what I do and it doesn't leave any log or trace allowing us to investigate. Can we have it resolved, please?

jakubhojnacki avatar Apr 16 '18 09:04 jakubhojnacki

I can see two issues opened here and it is a bit confusing. Are you also referring to the issue originally written by @YashinaElena ?

It still looks like a local problem to me and it is very hard to tell what is causing it. You claim that there is no server related errors in the event viewer. Since this is a Nav 2018 issue you should contact customer support. They can do a more detailed analysis.

kalberes avatar Apr 16 '18 11:04 kalberes

Thank you, kalberes. Yes - this is the same issue - of AL debugger not working with NAV 2018. And yes - you are right, it is about NAV 2018, but is is also about AL debugger - so I thought AL GIT would be the place to publish such problem. Am I wrong? And yet - all you are telling me is "local problem". I'm absolutely happy resolving it myself; just tell me how, please. Because - all I have - is the debugger not working in multiple environments and CUs - it is not isolated example.

jakubhojnacki avatar Apr 16 '18 13:04 jakubhojnacki

AL Git is primarily for the latest development environment issues for BC. We do look also at Nav 2018 issues but if we cannot find anything obvious, these should be handled as a Customer Support Request. In this case I have so little information that I would only be able to have a clue on your issue only if i could attach two debuggers with full pdb support to your Nav Server and the Al VSCode extension . That said are you sure that you run all the same NAV server versions and the strictly associated VSCode versions in all your scenarios? There was one breaking change related to the debugger between the release of NAV 2018 and CU1. Thus you would not be able to use VsCode AL extension for versions > NAV 2018 RTM with the RTM version of Nav 2018 Server and vice versa. What is postman saying if you trigger a GET request like http://localhost:7049/navision_nav/dev/signalr/connect?clientProtocol=1.4&transport=webSockets&connectionData=[{"Name":"DebuggerHub"}] 7049 should be your DeveloperServicesPort in the customsettings.config on the server You should get a 401.

kalberes avatar Apr 16 '18 14:04 kalberes