Google Apps Script provides the Logger class for basic debugging, and for more advanced needs, the console class introduced in the V8 runtime.
Logger
console
Google Apps Script, a cloud-based scripting language for automating tasks across Google products, doesn’t have a built-in REPL tool similar to those in languages like Python or JavaScript’s Node.js.
Google Apps Script provides a built-in debugger within the Apps Script Editor to help troubleshoot scripts.
While Google Apps Script does not have a built-in testing framework like some other programming environments, you can still write and run tests by leveraging simple GAS functions or integrating external testing libraries such as QUnit.
QUnit