Pages: 1
Print
Author Topic: XMetaL Developer: Debug Application Customization  (Read 966 times)
lerche
Member

Posts: 5


« on: January 18, 2018, 02:50:03 PM »

Hello,

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, English

I 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');

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 Files\XMetaL 12.0\Author\StartUp), 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é


* Capture.PNG (12.14 KB, 883x189 - viewed 100 times.)
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2568



WWW
« Reply #1 on: January 19, 2018, 08:03:09 PM »

This 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.
« Last Edit: January 19, 2018, 08:07:01 PM by Derek Read » Logged
lerche
Member

Posts: 5


« Reply #2 on: January 21, 2018, 03:12:47 PM »

Thank 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?
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2568



WWW
« Reply #3 on: January 22, 2018, 03:25:17 PM »

Any MCR file you place in the Startup folder is Application-level (available before any documents are open and for every document type).
Logged
Pages: 1
Print
Jump to:  

email us