gs.log doesnt work on client script

kamleshpatel
Giga Contributor

Hi all,

I have a very basic question.   gs.log doesnt work on client scripts. I am using lot of alert to debug.. what are the alternatives ?

I know i can create ajax methods to create those logs.. but is there a simpler way???

~ Kamlesh

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Kamlesh,



yes gs.log() statement are for server side only so for client side debugging you can add console.log() or alert statements.



There are several strategies for debugging client-side scripts:


  • JavaScript Log and jslog()
  • Field Watcher
  • try/catch
  • Debugging tools built into web browsers (browser dependent)


Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

saprem_d
Giga Guru

Hi,



Please alert() method to debug client side scripts.



~Saprem


Ankur Bawiskar
Tera Patron
Tera Patron

Hi Kamlesh,



Any update on this?


Can you mark answer as correct, helpful and hit like if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps people to find similar question easily. Thanks in advance.



Regards


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Kamlesh,



Any update on this?


Can you mark my answer as correct, helpful and hit like if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.



Regards


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader