General XMetaL Discussion
ghkrause January 13, 2009 at 9:18 pm
XMAX says Run-Time Error – How to debug this?January 13, 2009 at 9:18 pmParticipants 2Replies 3Last Activity 14 years ago
My new XAC for a DITA customization including dialogs for metadata to be filled from SQL database tables does not work. I tried different things but I always get “Run-Time Error” dialog with “Line 2, Column 2” and “Description: Object expected”. I get this multiple times while the file opens in XMAX 5.1. When opening a new topic from template in my Sharepoint CMS I get this error dialog before and after the “File has been created” confirmation dialog. Only the second of many more than ten dialogs says “Line 11, Columns 2”, not any clearer than the others to me.
How to debug this error?
I can upload all or some files from the project. But I am fine if I get a hint …Derek Read January 13, 2009 at 11:25 pm
Reply to: XMAX says Run-Time Error – How to debug this?January 13, 2009 at 11:25 pm
If you have XMetaL Developer installed it would likely be easiest to run your project using the debug feature (F5 from within Visual Studio). That will give you more feedback, let you step through each macro line by line, set break points, and do other things like “step over”, “step into”, track variable values, view the complete DOM for any open documents, and possibly other things.
If for some reason you can't do that the next best thing would be to install the Microsoft Script Debugger from the microsoft.com website and then put a “debugger” statement into one or more of the scripts inside your MCR file. That statement will trigger the Script Debugger, which will give you more feedback. A good short description of this tool exists here together with various links to Microsoft documentation and downloads: http://en.wikipedia.org/wiki/Microsoft_Script_Debugger
Failing that you are likely left to guessing which MCR file (if more than one) and which macro inside it is causing the error(s). One simplistic way to do this is to remove MCR file(s) until the error goes away (then you know which one is causing the problem), then start cutting macros out of the problem MCR file until the issue goes away (then you know which macro), then hunt it down by line number (which you already know).
We do have a feature request in our system to report which file and macro is throwing a particular error, not just the line number. There is no guarantee that such a feature will ever be implemented (partly because in most cases debugging using one of first two methods above is usually not difficult).ghkrause January 13, 2009 at 11:40 pm
Reply to: XMAX says Run-Time Error – How to debug this?January 13, 2009 at 11:40 pm
I have XMetaL Author and Developer installed on my PC. XMAX cannot run here as it distroys Author dlls – this has been discussed with XMetaL support in 2008 and it was recommended to run XMAX on a different PC where I have no Developer license. I will try the script debugger and the removal of the mcr file that is built from all but three of the JScript files in source folder.Derek Read January 14, 2009 at 12:26 am
Reply to: XMAX says Run-Time Error – How to debug this?January 14, 2009 at 12:26 am
We're not sure what you are referring to when you say “destroying” DLLs. Both products install and share some DLLs located in the following (default) path: C:Program FilesCommon FilesXMetaL Shared
There should not be an issue with having XMetaL Author and XMAX both installed on the same machine and debugging XMAX using XMetaL Developer. If someone inferred that this was a problem it should not be, however, perhaps you have a specific environment set up that caused some concern here? There may have been a warning about cleanly uninstalling such a setup (depending on how it was installed), but as this is a developer machine it would be possible to manually un-regsvr32 and remove any DLLs mistakenly left behind by one of the installers.
There is a concern about deploying both XMAX installed via the standard EXE installer and via the Internet Explorer CAB file on the same machine. This should be avoided as essentially the same DLL will then be deployed to two different locations on your machine. It should not cause any problems but it is possible in theory that an application hosting XMAX might be confused about which copy to use (and if they are different versions that might be an issue).
- You must be logged in to reply to this topic.