No debugging possible after an event (NAV2017)

Peter_Kuiper
Member Posts: 19
I have a big problem with debugging in NAV2017, after an event has been invoked.
Please have a look at the following code.
First I call an integration event, and after that there is a programming error. The second INSERT gives an error. The page is just there to run the codeunit.
When I put a breakpoint before the publisher, I see the following behavior:
- The debugger doesn't step into the subscriber. It executes the code, but it doesn't show me in the debugger. This is very annoying and time consuming while debugging an issue.
- Even worse than above: the debugger doesn't stop at the second INSERT! I do get the MESSAGE ('after first insert') and an error at the second INSERT, but I cannot use the debugger to find the problematic line in the code.
- F11 (Step into) doesn't work either. The debugger doesn't work at all anymore after the event.
- The debugger gives a fatal error. Sometimes I cannot start the debugger anymore, and have to restart the NAV service.
- If I put the first line in comment (e.g. //publisher(); ), then the debugger works as expected
Does anyone has experience with this behavior, and is there a solution?
Please have a look at the following code.
OBJECT Codeunit 99999 Test Error After Event { OBJECT-PROPERTIES { Date=02-05-19; Time=16:04:13; Modified=Yes; Version List=; } PROPERTIES { OnRun=BEGIN publisher(); ItemTmp."No." := '1'; ItemTmp.INSERT; MESSAGE('after first insert'); ItemTmp.INSERT; END; } CODE { VAR ItemTmp@150002000 : TEMPORARY Record 27; [Integration] LOCAL PROCEDURE publisher@150002000(); BEGIN END; [EventSubscriber(Codeunit,99999,publisher)] LOCAL PROCEDURE subscriber@150002001(); BEGIN SLEEP(1); END; BEGIN END. } } OBJECT Page 99999 Test Page { OBJECT-PROPERTIES { Date=02-05-19; Time=15:51:53; Modified=Yes; Version List=; } PROPERTIES { ActionList=ACTIONS { { 150002000; ;ActionContainer; ActionContainerType=ActionItems } { 150002001;1 ;Action ; Name=Run Codeunit 99999; Promoted=Yes; OnAction=VAR TestErrorAfterEvent@150002000 : Codeunit 99999; BEGIN TestErrorAfterEvent.RUN; END; } } } CONTROLS { } CODE { BEGIN END. } }
First I call an integration event, and after that there is a programming error. The second INSERT gives an error. The page is just there to run the codeunit.
When I put a breakpoint before the publisher, I see the following behavior:
- The debugger doesn't step into the subscriber. It executes the code, but it doesn't show me in the debugger. This is very annoying and time consuming while debugging an issue.
- Even worse than above: the debugger doesn't stop at the second INSERT! I do get the MESSAGE ('after first insert') and an error at the second INSERT, but I cannot use the debugger to find the problematic line in the code.
- F11 (Step into) doesn't work either. The debugger doesn't work at all anymore after the event.
- The debugger gives a fatal error. Sometimes I cannot start the debugger anymore, and have to restart the NAV service.
- If I put the first line in comment (e.g. //publisher(); ), then the debugger works as expected
Does anyone has experience with this behavior, and is there a solution?
0
Comments
-
I had the same problem with NAV 17, the solution is to upgrade the application to the last CU (only the application, not the objects).
There is an interesting powershell tool to split the NAV DVD into client, service,.. folders to simplify in case0 -
Thank you for your reply.
I just installed CU19, and now it works fine.1 -
> @Peter_Kuiper said:
> Thank you for your reply.
> I just installed CU19, and now it works fine.
Perfect, I'm happy it helped you 👍0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions