Home  >   FAQs   >  What is the Debugging method to write Server scripts?
FAQs in this section

What is the Debugging method to write Server scripts?

Table of Contents

Log Method (log)

  • Log method available for logging data in the code.
  • Useful for displaying records, user data is passed to the main method, or HTTP request responses.
  • Logs are shown in the CRM, aiding code writing and validation.
 
Note: Along with the provided log() method, you can also use javascript’s console methods (console.log, console.debug, console.info, console.warn and console.error). Logs added will be available in output and even in execution logs.

Example
async function main(record, user) {
try {
var response = await vtap.macro.http.get(https://www.mywebsite.com’);
log(response);
} catch(error) {
console.error(error);
}
}
Was this FAQ helpful?
0  out of  0  found this helpful.
Comments 0
Be the first to comment
© Copyright 2023 Vtiger. All rights reserved.