5.0 SP1 Debugger Bug?

bhalpin
Member Posts: 309
Ok, after seeing this about 20 times today, I'm pretty sure I'm not crazy.
I run a codeunit and notice a problem.
I edit the codeunit. I save it, compile it, etc.
I run the codeunit and see the same problem.
I edit the codeunit and set a breakpoint at/near the place I made the changes (which are visible), and close the editor window. (No change to the code whatsoever.)
I enable the debugger and run the codeunit.
The debugger pops up at the breakpoint and I look around and my code changes are *not there*.
What the ... ?
I exit NAV and restart.
I enable the debugger and run the codeunit.
The debugger pops up on the breakpoint and this time my code change *is there*.
Am I on the wrong meds or something?
Bob
I run a codeunit and notice a problem.
I edit the codeunit. I save it, compile it, etc.
I run the codeunit and see the same problem.
I edit the codeunit and set a breakpoint at/near the place I made the changes (which are visible), and close the editor window. (No change to the code whatsoever.)
I enable the debugger and run the codeunit.
The debugger pops up at the breakpoint and I look around and my code changes are *not there*.
What the ... ?
I exit NAV and restart.
I enable the debugger and run the codeunit.
The debugger pops up on the breakpoint and this time my code change *is there*.
Am I on the wrong meds or something?
Bob
0
Answers
-
do you mean the debugger has the old version of your code in cache or something?0
-
Yup.0
-
Does it happen while the debugger is still sitting out there, or do you close it between runs? Have you tried closing the debugger between runs?
Never seen that before. If that's the case though, nothing you can do about it. Close the debugger, close NAV, restart NAV and debug again. It's a pain in the bootie, but if that's how it works that's how it works. Report it to MSFT and hope it'll be addressed in a hotfix.0 -
I've seen this, and yes the debugger caches the old version. You have to close the debugger afterwords.0
-
Hi.
I close the debugger between runs.
I learned the hard way what happens if you have extra windows open on C/AL code - you know - losing all your changes when you close the out-of-date window and answer Yes to the save prompt? (Haven't been bitten by this yet? Wait, you will. And you don't forget it!) #-o
So, I'm very consious of what windows are open.
I'll try it a few more times just to be sure before I report it to MS though.
Bob0 -
it would suck if you have to restart NAV as well as the debugger. It's not going to improve anyone's productivity0
-
I find that when I'm developing it's always best to set the object cache to 0 (the default is 320000). This way I can guarantee that I'm always loading the latest & greatest objects (especially important if there are other developers in the same DB and I need to have access to their changes).0
-
I experienced this in a db under a NAV server, and a copy of the database opened locally.
Bob0 -
What is your Object Cache set too?0
-
Checked object cache. It is 32000
Changed it to zero. Closed and reopend database.
Confirmed cache is still 0
Ran a given codeunit
Edited codeunit by insering a new code line (not comment)
Closed, compiled and ran the codeunit
Edit the codeunit and set a breakpoint on line above new line
Closed codeunit window
Enabled debugger
Ran codeunit
Debugger comes up at correct breakpoint
New code line inserted previously not visible in debugger.
Conclusion: :bug:0 -
Which codeunit by the way? I ask becasue Codeunit 1 and anything launched in it is cached till you close and reopen NAV, and there is NO way around that.David Singleton0
-
Oh I hadn't even though about that. This aplies to all single instance codeunits. Once those are started they live on in memory, and they will not pick up changes that you make until after you restart NAV. Like David says, there is no way around that, it is the nature of single instance codeunits.0
-
That's It!!! \:D/
It is a single-instance codeunit!
Problem solved!
Thanks to everyone who contributed.
Bob
P.S. Mibuso RULES!0 -
Good, glad you made that work
and yes Mibuso does rock :-({|= (bluegrass style
)
You know the ironic thing is I spent literally days trying to come to terms with the same issue, so I am kicking myself for taking so long to suggest that. ](*,)0 -
DenSter wrote:Good, glad you made that work
and yes Mibuso does rock :-({|= (bluegrass style
)
You know the ironic thing is I spent literally days trying to come to terms with the same issue, so I am kicking myself for taking so long to suggest that. ](*,)
I had the issue in the very early days trying to add some password enhancements for a client in 1.3, took us a long time to figure it out, so it alwasy ssticks in my head. Recently I was using Ahmeds brilliant little single instance thing to find consistant errors, and had the same issue, and still remembering that earlier instance, I worked it out in minutes instead of days.David Singleton0
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