r/GoogleAppsScript • • Feb 26 '26

Question Debugging object variable in IDE

Just came back to do some GAS work after a gap of some time.

When debugging objects in the gas editor, right hand panel, just appear as a long list of methods. How can I find out what their actual value is? I can of course print it out but I prefer to avoid that.

primitive types like string, int work ok and I am sure I remember objects being displayed in a helpful way before.

1 Upvotes

4 comments sorted by

View all comments

Show parent comment

2

u/WicketTheQuerent Feb 27 '26 edited Feb 27 '26

Objects belonging to Apps Script services don't have a .toString() method and don't display a value in the debugger. The exception is the event (onOpen, on Edit, ...) objects.

In the case of an Apps Script calendar object, you might use the getName() or the getId() methods to print a value or store it in a variable to make it readable in the debugger.

1

u/RomanoDesiree Feb 27 '26

!thanks for the explanation.