This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debugging UI Extension App in VS 2019

Hi community and M-Files,

We are following instructions provided in www.m-files.com/.../ technical article to enable debugging. From time to time, we get loaded our specific iFrame under Script Documents -> Windows Internet Explorer -> <our dashboard site> -> <set of Javascript files>.

Then after clicking through the client, our site is gone again and does not show up again. When it is up, we are enabled to set breakpoints into JavaScript framework files (such as bootstrap, jquery etc.) but breakpoints in our JavaScript code does not work.

Also we don't see main.js during debugging at all. We know this is JScript document. This problem is described here: community.m-files.com/index.php

How do you debug your UI extension apps? Any plans to stick to one scripting language and not to mix between JScript and JavaScript in future?

Dejan
Parents
  • Unfortunately, as mentioned on the page you link to (www.m-files.com/.../
    "Hosted JavaScript code (UI Extensibility Framework modules) cannot be debugged [on M-Files 9.0]"
    i.e. module code cannot have a debugger attached; you will never see "main.js" (assuming this is a module) appearing in Visual Studio.

    Debugging of these files within Visual Studio is a pain. I've seen one version of Visual Studio on a machine work, whilst another on the same machine does not. Sometimes that's 2019 that works, sometimes 2017. Sometimes reinstalling Visual Studio fixes it, sometimes not. Sometimes rebooting fixes it.

    Unfortunately I am not aware of any changes upcoming to the UIX which would help in this matter.

    My recommendation (and it's not one that I like to state, but it is one that unfortunately I have to fall back to) is to design your development around not requiring a debugger being attached. Instead, route important data to a logging window or similar and reference it from there.

    Regards,

    Craig.
Reply
  • Unfortunately, as mentioned on the page you link to (www.m-files.com/.../
    "Hosted JavaScript code (UI Extensibility Framework modules) cannot be debugged [on M-Files 9.0]"
    i.e. module code cannot have a debugger attached; you will never see "main.js" (assuming this is a module) appearing in Visual Studio.

    Debugging of these files within Visual Studio is a pain. I've seen one version of Visual Studio on a machine work, whilst another on the same machine does not. Sometimes that's 2019 that works, sometimes 2017. Sometimes reinstalling Visual Studio fixes it, sometimes not. Sometimes rebooting fixes it.

    Unfortunately I am not aware of any changes upcoming to the UIX which would help in this matter.

    My recommendation (and it's not one that I like to state, but it is one that unfortunately I have to fall back to) is to design your development around not requiring a debugger being attached. Instead, route important data to a logging window or similar and reference it from there.

    Regards,

    Craig.
Children
No Data