Debug NAS

Frekie
Member Posts: 19
Hey all of you.
Is there a way to debug the code executed/triggered thru NAS when working with Commerce Portal.
E.G. I know that there is something wrong with the salesmanagement codeunit. Is it possible to debug that codeunit ?
I was thinking of stopping the NAS Service ans starting it as an application but that did not work.
I know that it is possible to debug Commerce Gateway by stopping the NAS Service and starting Commerce Gateway Single Instance Codeunit. Does that apply to Commerce Portal as well ?
Thx for any hints.
Is there a way to debug the code executed/triggered thru NAS when working with Commerce Portal.
E.G. I know that there is something wrong with the salesmanagement codeunit. Is it possible to debug that codeunit ?
I was thinking of stopping the NAS Service ans starting it as an application but that did not work.
I know that it is possible to debug Commerce Gateway by stopping the NAS Service and starting Commerce Gateway Single Instance Codeunit. Does that apply to Commerce Portal as well ?
Thx for any hints.
0
Comments
-
Start NAS from the command line and use the debug parameter.0
-
I have a codeunit that I start instead of using NAS. That gives you full access to the debugger.0
-
hi
i dont know my idea will solve your purpose but still i am writing..
for debugging what i do is write messages in navision code units just like we do generaly .
and we can see these messages in application Log of system.
i follow this thing and it always worked for me.Naushad Alam
Consultant -Navision
All e Technologies (P) Ltd.
Building Solutions for Extended Enterprises
www.alletec.com0 -
Frekie,
If all that your NAS does is start a single instance codeunit, then yes you should be able to start it from a client session and turn the debugger on. This is generally how you would debug a NAS. If it does more than just start a single instance codeunit, then you'd have to run the server with the debug parameter.0 -
I have started the nas in debug mode, but that only helps me see messages that I would be able to see in the event viewer anyway.
What I really want to do is debug inside Navision. I would like to crawl through the code as information is sent through Navision through NAS. (even though I don't have any errors at this time)
Is there any way I can do this? I am sending information from web and do get a valid response sent back to web, but nothing happens in Navision. ->neither in code coverage nor debugger records any actions...
I am logged on to the database server and have logged into navision with the same user that NAS logs on with.... working on 3.70
thanks for any help!0 -
You can create a table with several text fields and a function which insert data into that table. Put this function in the code everywhere you need and pass it values you're interesting in. Then you can look through the table and analyze what data have been modified while NAS worked.0
-
Stop the NAS service. Open Navision. Turn on the debugger. Run the codeunits that would normally be run by NAS from the object designer. This should now trigger the debugger and you should see the message received event fired.0
-
alex9 wrote:You can create a table with several text fields and a function which insert data into that table. Put this function in the code everywhere you need and pass it values you're interesting in. Then you can look through the table and analyze what data have been modified while NAS worked.
Be carefully because you must COMMIT the Data so it won't be lost when occuring an error. But such a COMMIT can do things which shouldn't be done in an Error Event
A better way to follow the variable values as in the Event Log may be using this Component I developed?
http://www.mibuso.com/dlinfo.asp?FileID=5320 -
Hi,
my prefered way to debug NAS code is:
1.) Create a new form
2.) Create a button on it
3.) WIth the button click event run a function call to Codeunit 1 - function 99 (NASHandler).
So for step 3 create a var with type Codeunit and ref to Codeunit 1.
Then just run: Cod1.NASHandler('YOURNASID');
Then the client is acting like a NAS and you can use the debugger as usual.
HTH,
Rainer0 -
Oh that is smart. That way, if the NASHandler does more than run one codeunit, you're safe. Good idea
.
0 -
this is a good idea, but what does NASID look like?0
-
NASID is the startup parameter that you are using for your instance of NAS. For Commerce Gateway for instance it is CG, for ADCS it is ADCS, for the job queue it is JOBQUEUE, etcetera.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