How to debug NAS

jony_kwa888
Member Posts: 9
HI All,
I have been trying to debug code in NAS.
I follow the instrusction in the disc documentation which basically said that you need to have DEBUG keywords on installing the NAS.
I did and put the break point in the report/codeunit that NAS suppose to call but it never breaks. Do i need to include the breakpoint file or something?
btw, I'm using job-queue instead of straight NAS, will that make an impact?
I have been trying to debug code in NAS.
I follow the instrusction in the disc documentation which basically said that you need to have DEBUG keywords on installing the NAS.
I did and put the break point in the report/codeunit that NAS suppose to call but it never breaks. Do i need to include the breakpoint file or something?
btw, I'm using job-queue instead of straight NAS, will that make an impact?
0
Comments
-
you need to start NAS from cmd prompt with Debug parameter and all the other paramater like db, server, company, etc.
I can't remembe 100 percent but you can put the file or it will error when job queue runs and runs your codeunit. then you can put breakpoint in debugger.
There is no difference between Nav client and NAS except no Dialog can be opened or confirm question asked.
I wish NAS ignored them.
Job queue writes down the error. what error do you get in job queue?0 -
I just read your other post on printing issue.
Just start it from cmd prompt with debug parameter and the dugger will start at first error.0 -
Thank you for your responses.
You guys mentioned about error. Is that mean that it needs to hit error before it can be traced?
can I just put a break-point in the code and expect the debugger to hit the break-point even there is no error?
Thank you.0 -
1) Sometime you need to place developer license into NAS folder if you want to run debugger in NAS
2) You can use breakpoints, but you do not have IDE to set them. It means you need to set them in Client, find the breakpoint.xml where the breakpoints are saved and use this file as parameter when running NAS from CMD (pameter "breakpoints").
3) If you enable debugger, NAS will start with debugger in "Stop on triggers" mode. Than you can go through code and set breakpoints in the actual object. It mean, if you need to set breakpoint in codeunit called from NAS handler in CU1, you need just to hit F5 once, and than find the code in the codeunit and set breakpoint...0 -
Although it's not 100% the same, quite a handy possibility is to start the nas codeunits from a normal client and debug it from there. Keep in mind that the user credentials may differ, because nas always uses a window login.
Thomas0 -
For starting the NAS in debugmode, do following.
Stop the Service, be sure, your windows login is authorize to login on the database.
Open CMD. Go to the folder where your nas.exe or nassql.exe is stored.
Type following (example for NASSQL).nassql debug,appservername="YourNASName",servername="DatabaseServer\NamedInstance",database="YourDatabase", company="YourCompany",startupparameter="YourStarUpParameter", objectcache=32000,nettype=tcp
RegardsDo you make it right, it works too!0 -
2) You can use breakpoints, but you do not have IDE to set them. It means you need to set them in Client, find the breakpoint.xml where the breakpoints are saved and use this file as parameter when running NAS from CMD (pameter "breakpoints").
Hi is this true, can someone tell us where to find this xml-file?0 -
To debug in NAS in NEP I
1. Used a .BAT file with the following info:
"D:\Program Files\Microsoft Dynamics NAV\Application Server\nassql.exe" Debug,Breakpoints=D:\Breakpoints.xml,appservername=<servername>-SQL,servername=servername,DATABASE=<databasename>,company=<companyname>,startupparameter=NEP-1
2. In the debug window that appeared I unchecked the "Break on triggers" and pressed F5
4. Ran the application
3. Set a breakpoint where it encounters an error and breaks or created an error (e.g. ERROR('test') )then set breakpoints. The breakpoints will be saved in the .XML which I created.0 -
Breakpoints that are stored in the Breakpoints virtual table are automatically stored
in a NaviBP.xml file. The file is located by default in the same folder as the fin.zup
file. On a Windows 2000 or Windows XP computer, the path is: C:\Documents and
Settings\user\Application Data.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