Debugging in Aras Innovator

Debugging in Aras Innovator

Debuggers are one of the post powerful tools available to developers. Today we'll be going over how you can use your browser and Visual Studio to debug any method code inside of Aras Innovator.

Debugging a Client Method

JavaScript methods are the simplest to debug. All you need to do is add a single line of code to your method: debugger;. After saving your Method, simply open your browser's developer tools (typically launched by pressing F12 on the keyboard) and perform the action that runs the Method. You should notice that the execution of the Method halts directly where you've placed your debugger; statement.

From here, you can conveniently step through your function line-by-line. Note that I'm using Google Chrome, and your developer tools will look different if you're using another browser.

Checking the Context of a Method

One of the first things I do when I get the question "How do I do X in Aras Innovator?" is open up a debugger. This is especially true if X involves client-side functionality since the information you have access to from a JavaScript method can change significantly based on where the method is called from. The developer tools of our browser can help us figure out what information and functions are available to us.

For example, let's walk through a use case where we want to programmatically download a file. There's a common aras object that's available from almost every client-side method that contains many useful functions for commonly desired use cases. Let's see if this object has anything for downloading a file.

Just by typing in into the console and checking the autocomplete suggestions, we can see that there are indeed two functions on the aras object for downloading files: aras.downloadFile and aras.downloadItemFiles. By selecting one of these functions and hitting enter, we can even see what the expected arguments are.

So it looks like aras.downloadFile expects a File item and a name to use for the downloaded file. Let's test this by getting a file we already know exists and trying to download it with a different name.

Sure enough, we'll notice that we downloaded our file with the name downloadedFile.txt. Exactly what we were looking for!

This is a simple example, but it covers some powerful aspects of the developer tools that can help you efficiently write JavaScript in Aras Innovator.

Debugging a Server Method

Setting up your environment to debug a server method is slightly more involved. To begin, you'll need to navigate to your Innovator installation which you can find by default at C:\Program Files (x86)\Aras\Innovator\. In this folder, you'll open the InnovatorServerConfig.xml inside of your favorite text editor. Next, add the following tag as a child of the <Innovator/> tag.

<operating_parameter key="DebugServerMethod" value="true"/>

NOTE: Server-side debugging is disabled by default to save disk space. In order to debug server methods, there are temporary files created at `\Innovator\Server\dll\`. We recommend only enabling this option in a Development environment and to only leave it enabled as long as you need to debug your code.

Now that we've configured our Server for debugging, we can add our debugger statements to our server methods. For both VB and C# methods, you'll want to add the following two lines.


You'll notice when you run your method with these two lines added, you'll be prompted to open the Visual Studio Just-In-Time Debugger.

After saying yes, you'll then be prompted to select which instance of Visual Studio to open the debugger in. If you already have Visual Studio open, you can select that from the list. Otherwise, you can launch a new Visual Studio instance here.

Inside of Visual Studio, you can step through your code line-by-line in much the same way as you did inside of your browser's developer tools.

NOTE: If you did not add the operating_parameter, you will see a message like this when you open Visual Studio, and you will not be able to step through your code.


Subscribe to our blog and follow @ArasLabs on Twitter for more helpful content! You can also find our latest open-source projects and sample code on the Aras Labs GitHub page.

  • Very useful information on Debugging methods in Aras Innovator. specially for a fresher like me.

    Here am facing an issue with debugging server methods. I usually enable the line <operating_parameter key="DebugServerMethod" value="true"/> in innovatorserverconfig.xml file and put the debugger break code in my server methods. If I do the respective selections the Choose Just-In-Time Debugger window will popup. But it is not working suddenly for some reason. I have tried with Client methods debugging and it worked fine.

    What could be the issue. How do I troubleshoot this issue. Is there anything I need to check at Visual studio?



  • I have set environment to debug a server method. Some temporary files also created at `\Innovator\Server\dll\`.

    Can you please explain me next step?


    Where do I add this two lines?

    How to run method with these two lines added?

  • Hello,

    Yes, server debugging should work on any version of Aras Innovator as described in this blog.

    From my experience, I haven't needed to restart IIS after enabling debugging in the InnovatorServerConfig.xml . However, if you find that the debugger is not catching, restarting IIS and/or visual studio on the server may resolve the issue.

    The debugger popup will appear on the Server that Aras Innovator is installed on. It will not appear on the client machine.


  • Hi Christopher, I just have a few questions about server method debugging if you don't mind.  Should the server method debugging work in any version of Aras?  Do you need to restart anything for the change in 'InnovatorServerConfig.xml' to take effect?  Should the 'Choose Just-In Time Debugger' popup appear on the server where Aras is installed or on the machine which triggered the method?  Thanks