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
  • 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.
  • Hi Craig,

    Thanks for the clear answer. This is really pity as when you develop you need from time to time to understand what is going on behind the scene ;).
    As those UI extensibility apps (dashboards especially) are based on IFrame embedded pages and if I understood limited to IE functionalities, what would happen if one day there is no IE explorer any more on customers' computers and they use chrome, MS Edge? Would those dashboard pages work still?

    Nevertheless debugging (even though as you mentioned works sometimes and sometimes terribly fail) helped us to find our that other embedded built-in dashboard pages (built-in metadatacard, tabpane etc.) seems to use older version of bootstrap and jquery framework so we needed to downgrade our code as well to make it working. Any plans to refresh it to latest framework versions, at least bootstrap, cause we needed to re-write a lot?

    Thanks.

    Dejan
  • Hi Dejan,

    We don't believe that we explicitly embed Internet Explorer; we embed the WebBrowser control that Microsoft provides. In practicality this is the Internet Explorer engine but, even if Microsoft stop using the legacy Internet Explorer standalone browser, this control will continue to be available.

    I know that Microsoft did say that they would look to replace the WebBrowser control with the Chrome-based Edge at some point in the future. My understanding is that this would be a different control, though ("WebBrowser2"?), that people could opt into using if they wanted to. However, I am unaware of the state of that development at Microsoft, and I do not believe that M-Files is currently actively developing anything that would change the above developer story.

    Regards,

    Craig.
  • Thanks again Craig.

    I am wondering if we could configure default web browser control to be for example Chrome instead of IE. Do you perhaps know where this configuration is hidden in Windows and if this is possible at all?
  • I don't believe that this is possible (this is a Windows feature, not M-Files specific), but would be interested if you find a way.

    Regards,

    Craig.