By Adam Nagy
Unfortunately, in iLogic you do not have the same features you get in case of VBA or Visual Studio projects. Stepping through the code, checking variable values, setting up breakpoints are all missing from the iLogic environment.
If the iLogic functionality is not enough and you also need to access the underlying Inventor API, then I think the easiest way is to test things out in VBA. There you can also get familiar with the object model by examining the properties of existing objects: http://adndevblog.typepad.com/manufacturing/2013/10/discover-object-model.html
One way to debug iLogic code could be using Trace calls, which can write out information about where the code is at a given moment and what the values of certain variables are. This was mentioned on the forum: https://forums.autodesk.com/t5/Inventor-General-Discussion/iLogic-Developing-and-debugging/m-p/2850580
I used one of my test documents (Download ILogicTestDebug) and added a couple more rules to it so that I can see which rule is called after which other rule, etc. Just placed Trace calls like these inside the rules:
Trace.WriteLine("iLogic: 'Update' rule start") Trace.WriteLine("iLogic: 'Width' = " + currentWidth.ToString())
Note: you might need to add Imports System.Diagnostics at the beginning of the rule
Once I downloaded the DebugView application I could see all my messages in there, along with messages coming from other applications: