How can I debug a value of a variable in JavaScript?

Post Reply
menglv
Newbie
Posts: 15
Joined: Mon Mar 10, 2014 10:25 am

How can I debug a value of a variable in JavaScript?

Post by menglv »

How can I debug a value of a variable in JavaScript?

thanks
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

How can I debug a value of a variable in JavaScript?

Post by dkelly »

s.log(1, "variable = " + variable);
freddyp
Advanced member
Posts: 413
Joined: Thu Feb 09, 2012 3:53 pm

How can I debug a value of a variable in JavaScript?

Post by freddyp »

In Switch 12 there have been changes to reduce the number of messages considerably. As a result of that there is a slight change in behavior for s.log.



Level 1 will still display a message in Switch Scripter, but not in the Messages pane anymore (the same is true for -1 (debug)). So for regular debugging in Switch Scripter you can use that, but should you want to see the message in a running flow you will have to use 2 (or 3).



Note that this is also the case for "Log job info".
menglv
Newbie
Posts: 15
Joined: Mon Mar 10, 2014 10:25 am

How can I debug a value of a variable in JavaScript?

Post by menglv »

var re ="5454564";

var s=Switch;

s.log(1,"variable = " + re);



TypeError. Undefined member function 'log' for object '[object FactoryObject]' of type: 'FactoryObject'
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

How can I debug a value of a variable in JavaScript?

Post by dkelly »

The variable "s" is already defined.



var re ="5454564";

s.log(2,"variable = " + re);
menglv
Newbie
Posts: 15
Joined: Mon Mar 10, 2014 10:25 am

How can I debug a value of a variable in JavaScript?

Post by menglv »

Well, it can work.
Post Reply