Debugging in 2009 Service tier

genericgeneric Member Posts: 511
edited 2008-12-18 in NAV Three Tier
I was following the following blog on debugging Here are a couple of things I noticed while doing this on XP.
http://blogs.msdn.com/clausl/archive/20 ... -2009.aspx

First after you turn on in customsettnig.config by adding the line

<add key="EnableDebugging" value="true" />

the location where c# is created is in a different folder. It's in

C:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server

Inside you'll find a sub folder with a number. This number is equal to process ID of Service Tier. So when you restart Service tier it will get a different Processor ID and all existing folder gets deleted.

If you are debugging in VS 2008 then you have disable a dubbging option "Enable Just My Code"


You cannot debugg for a long time otherwise client will close connection with Service tier. Is there a setting to make that timeout longer somewhere? or a setting for the RT client that it's in debug mode and doesn't disconnect.
The Service tier crashes after this and I had to restart it.

Comments

  • freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    The EnableDebugging flag doesn't have any meaning in the Marketing beta nor CTP4.
    You can still debug, but it won't generate all C# files for you - it will do that when it meets the object the first time.

    If the OperationTimeout is set to MaxValue in CustomSettings.config - that is it.

    <add key="OperationTimeout" value="MaxValue"></add>

    BTW - note that SP1 is required for Visual Studio (that be 2005 or 2008)
    Freddy Kristiansen
    Group Program Manager, Client
    Microsoft Dynamics NAV
    http://blogs.msdn.com/freddyk

    The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
  • havhav Member Posts: 299
    I want to debug Sales-Quote report in RTC.
    I followed the steps as mentioned in http://blogs.msdn.com/clausl/archive/2008/10/14/debugging-in-nav-2009.aspx

    After completing the first three steps of the above blog, i tried looking at "C:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60 \ Server \ MicrosoftDynamicsNavServer\source\Report" folder.

    I do not see any source code getting generated so that i can open it in VS and set breakpoint in it.

    What is causing the problem?

    Regards,
    Hemant
    Regards,
    Hemant
    MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
  • kinekine Member Posts: 12,562
    The path depends on the Win version. Check the Eventlog for more info about which folder is used.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • havhav Member Posts: 299
    I am using Windows Server 2003 SP2.
    I do not see any entry in EventViewer when i start RTC.

    Pls advise.
    Regards,
    Hemant
    MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
  • kinekine Member Posts: 12,562
    Not when you start RTC, but when you start NST. The source codes are on the server where the NST is running (and I mean the event log of NST)...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    And you did start the RTC after setting the enabledebugging key?
    That is when the files are generated.

    Also first time you start the RTC it might timeout due to the servicetier being busy generating files.
    Do you have any sources in the other directories? (codeunit, page)

    If not - then I guess you key is wrong - misspelled or something, servicetier didn't pick it up.
    Freddy Kristiansen
    Group Program Manager, Client
    Microsoft Dynamics NAV
    http://blogs.msdn.com/freddyk

    The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
  • havhav Member Posts: 299
    Yes i was able to see the generated source code when starting NST.

    The problem now i face is-
    - I opened Report204.cs
    - Attached Microsoft.Dynamics.NAV.Server.exe process.
    - Set breakpoint in Sales_HeaderOnAfterGetRecord(). The breakpoint is seen enabled.
    - Switched to RTC.
    - Opened Sales Quote and selected a quote for printing.
    - Clicked Print button.
    - It opened Sales Quote print|preview dialog (Classic layout).
    - I clicked Preview button.
    It does not switch to VS for debugging and stop at the selected breakpoint.
    Regards,
    Hemant
    MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
  • kinekine Member Posts: 12,562
    If it shows you classic request form and not request page, you do not have Layout for the report and it is running in classic client...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.