Debugging Javascript widget

Debugging Javascript widget

Hi all,
I am debugging problems in a JS/Vue widget from a Creator app which has C6 environments and also a portal, so when the widget returns into the Creator app, the URL has four possible variations.  I'm struggling to test in the dev environment because I need to return to "creatorapp.zoho.eu/XXX/environment/development/XXX" or "XXXdev.zohocreatorportal.eu" instead of "creatorapp.zoho.eu/XXX/XXX" or "XXX.zohocreatorportal.eu".

https://help.zoho.com/portal/en/kb/creator/developer-guide/application-settings/widgets/articles/js-api-documentation says "appName needs to be passed only when you need to push or pull data from other apps in your account" but then includes appName in all its example code.  

Questions:
1. If I don't include appName, will it save records to the right app (for both full and portal users) or will it cause an error?
2. Can I just pass back the URL from the #Page: onwards when I'm exiting the widget and need to go to a different page in the app?  Presumably that would get round the problems with different environments and the portal?
3. Is there a function equivalent to zoho.appname that will return the portal name?  I haven't yet found one.
4. The linked article keeps logging data to a console.  Any ideas where to see the console output please?

Many thanks