General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion XMetaL Developer: Debug Application Customization

  • lerche

    XMetaL Developer: Debug Application Customization

    Participants 2
    Replies 3
    Last Activity 4 years, 10 months ago

    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');[/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é

    Reply

    Derek Read

    Reply to: XMetaL Developer: Debug Application Customization

    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.

    Reply

    lerche

    Reply to: XMetaL Developer: Debug Application Customization

    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?

    Reply

    Derek Read

    Reply to: XMetaL Developer: Debug Application Customization

    Any MCR file you place in the Startup folder is Application-level (available before any documents are open and for every document type).

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support