02-19-2016 01:31 AM - last edited on 05-02-2016 05:08 AM by crosenbe
Is there a way of try-and-see test from within a running M.App application in browser? I tried to open Firebug console and run some example code but it claims that $GP is not recognized object name.
How to properly debug M.App? Do I need to place a debug code in M.App Studio, Save it and see the results?
Solved! Go to Solution.
02-19-2016 04:39 AM
this is a very good question! Currently debugging is supported only via adding
statement inside your customization code, which is of course a little tedious. The reason for that lays in security mechanisms, which require specific headers in the request for the script (so that it cannot be read without authorization to protect your intellectual property) that couldn't be added in a plain GET request like
The development team is already investigating alternative methods of applying customization code that would make the debugging process easier but would still protect scripts from unauthorized access.
05-04-2016 03:52 AM
When you customize your app you can add following line at the beginning of your custom script:
After this when you run your app, you should be able to see your script as:
You should now be able to debug as usual. Works in both Chrome & FF.
05-09-2016 12:58 AM
Sorry for the dumb questions but...
05-09-2016 04:17 AM
no, no - it is all about creating a comment inside the code that you type in the custom panel with the editor.
Browsers that support that have some special logic that looks for such comments and then are able to present evaluated scripts as if they were coming from a file.
The name "foo.js" is completely arbitrary because it doesn't really matter - it just means that the evaluated code will be presented as if it was coming from the "foo.js" file. Please take a look at this article https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Debug_eval_sources