Saturday 16 May 2015

Debug Aras Innovator server and client methods

Debugging Server Method

If you want to debug your custom methods or any OOTB methods,
Go to Aras UI
Open method from (Administration-->System Events-->Methods-->)
Search for method name
Open it
Lock
Now go to code..
Inside Function Main() as Item

or go to Main() function

Add below code..

System.Diagnostics.Debugger.Launch()
System.Diagnostics.Debugger.Break()

Compile, Save

Now go to Aras UI, do any action which trigger your method.
Now go to Aras Server.
You will see one prompt

I the prompt-->Click on Yes, debug w3wp.exe
It will as conformation
Then select visual studio..


Debugging Client Method


1.      As per “_Students Masters Developers 11.pdf”
Add the statement “debugger;” at the point you want to set as breakpoint to invoke the debugger. The following description is applied when ARAS instance is invoked in internet explorer.
Deselect Disable Script Debugging in Advanced Options of Internet Explorer. Select Display a notification about every script error in Advanced Options of Internet Explorer



Client Debugging with Visual Studio 2010

To debug client JavaScript methods with VS 2010 (or greater) requires additional setup. Use the following steps to debug a client program:
1.       Start Aras Innovator in Internet Explorer but do not logon to the system.
2.       Start Visual Studio 2010.
3.       From the VS 2010 main menu, select "Tools" and "Attach to Process"
4.       Locate the "iexplore.exe" process with the "Title" that matches the Aras Innovator instance.
5.       Select the process and click "Attach".
6.       Return to the login screen for Aras Innovator and press F5 to refresh the page.
7.       Log in to Aras Innovator
8.       Run the Method and the application will switch to the "Microsoft Visual Studio .NET 2010" debugger and break on the debugger; statement in a client JavaScript method.