//Copyright (c) 2025 - All rights reserved by innovaITon //URL: https://innovaITon.co.za/ //Description: Debug GAS code function TestDebug() { let n = 1; if (n == 1) console.log('1=1'); if (n === 1) Logger.log('1===1'); } //Global debug flag const cDebugOn = true; function LogDebugMsg(aModule, aClass, aMethod, aNote) { if (!cDebugOn) return //Replace below with your sheet ID and name: const cSheetID = 'YOUR_SHEET_ID'; const cSheetName = 'YOUR_WORKSHEET_NAME' var ss = SpreadsheetApp.openById(cSheetID); var sheet = ss.getSheetByName(cSheetName); //Date is automatically logged for every entry sheet.appendRow([(new Date()), aModule, aClass, aMethod, aNote]); } function TestDebugSheet() { LogDebugMsg('MyModule', 'MyClass', 'MyMethod', 'This is a debug note...') } function doGet(e) { //return ContentService.createTextOutput(JSON.stringify(e)); e = {"contentLength":-1,"parameter":{"parameter1":"1","parameter2":"\"two\""},"contextPath":"","queryString":"parameter1=1¶meter2=%22two%22","parameters":{"parameter2":["\"two\""],"parameter1":["1"]}} } function doPost(e) { return ContentService.createTextOutput(JSON.stringify(e)); //e = {"contentLength":-1,"parameter":{"parameter1":"1","parameter2":"\"two\""},"contextPath":"","queryString":"parameter1=1¶meter2=%22two%22","parameters":{"parameter2":["\"two\""],"parameter1":["1"]}} }