Search code examples
google-apps-scriptgoogle-apps-script-editor

"com.au" string is displayed as "(class)" in Script Editor


I need to store an Australian domain as a string. Australian domains end with ".com.au"

Google Scripts seems to be displaying all instances of ".com.au" with "(class)".

To reproduce, create a basic function in Google Apps Scripts as follows:

function myFunction() {
  var x = "com.au";
  console.log("x: " + x);
  var z = 1;   //<--create break point here
}

Create a breakpoint at var z = 1, and then debug the script.

Actual Results:

In the console (at breakpoint):

x: (class)

Expected Results:

x: "com.au"

*Note: upon further testing, from a practical perspective, "(class)" seems to still be treated as "com.au" so this is not a blocker to use, but it is odd and does not help when debugging.


Solution

  • This issue was reported as a bug to Google: https://issuetracker.google.com/issues/114358543