General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › XMetaL Developer: Debug Application Customization
-
lerche January 18, 2018 at 8:50 pm
XMetaL Developer: Debug Application Customization
January 18, 2018 at 8:50 pmParticipants 2Replies 3Last Activity 4 years, 5 months agoHello,
First of all: Thank you Derek Read for activating my profile on this board.
My Question relates to the following system:
XMetaL(R) Author Enterprise 12.0.0.077
XMetaL(R) Developer Version 12.0.0.077
Visual Studio 2015 (Community Edition) Update 3
OS: Windows 10 Pro, EnglishI am new to XMetaL Developer and I plan a small Application Customization for XMetaL Author Enterprise with my Experience in JavaScript. Therefor I created a new project with Visual Studio and tried to write a simple 'Hello World' program by testing different events like
- On_Application_Open
- On_Application_Close or
- On_Update_UI
When I start the program out of Visual Studio by pressing the 'Start' button, it is strange that the code will not be executed. By creating a breakpoint in the line
[code]Application.Alert('Hello world');[/code]
I can see that the breakpoint would not be hit. You can see it by the red circle with the white filling (have a look at attachment). But when I copy the build artifact (*.mcr file) into the startUp folder (C:Program FilesXMetaL 12.0AuthorStartUp), the code will be executed. I know it, because I can the see my 'Hello World' alert boxes.Is this problem a bug of XMetaL Developer or am I doing something wrong?
I would be grateful for your help.
René
Derek Read January 20, 2018 at 2:03 am
Reply to: XMetaL Developer: Debug Application Customization
January 20, 2018 at 2:03 amThis is a known limitation. It is documented in the readme for XMetaL Developer as “Application-level XAC debugging does not work”.
You will need to deploy the MCR file in this case, and if you need to debug it you can insert a debugger statement into the file at the location you want to trigger script debugging. It isn't as elegant as being able to start it from Visual Studio with the ability to set a break point but it should give you script debugging.
For JScript insert the keyword “debugger” (without quotes) at the line you wish to trigger the debugger.
lerche January 21, 2018 at 9:12 pm
Reply to: XMetaL Developer: Debug Application Customization
January 21, 2018 at 9:12 pmThank you very much for your answer!
It's a great pity, but it is good to know. What would you suggest for writing a global macro that can analyse the content for several kinds of XML documents? I think the only way is to write a macro for a specific dtd. After that i would deploy the resulting macro in the startup folder. Are there any other good options?
Derek Read January 22, 2018 at 9:25 pm
Reply to: XMetaL Developer: Debug Application Customization
January 22, 2018 at 9:25 pmAny MCR file you place in the Startup folder is Application-level (available before any documents are open and for every document type).
-
AuthorPosts
- You must be logged in to reply to this topic.