Announcement

Collapse
No announcement yet.

very easy efs debug question (v11)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • very easy efs debug question (v11)

    when I load

    function main()
    {

    debugPrint("db");

    return null;
    }

    in version 11 don't get any output in output window. am I missing something?

    also this works in v10.6 but not in v11. hoping I've just missed something?

    function main()
    {

    db("db");

    return null;
    }

    function db(a,b,c,d,e,f,g,h,i)
    {
    var str = "[" + String("0"+getMonth(0)).slice(-2) + "/" + String("0"+getDay(0)).slice(-2) + " " + String("0"+getHour(0)).slice(-2) + ":" + String("0"+getMinute(0)).slice(-2) + "]";
    if (a != null) str += "," + a;
    if (b != null) str += "," + b;
    if (c != null) str += "," + c;
    if (d != null) str += "," + d;
    if (e != null) str += "," + e;
    if (f != null) str += "," + f;
    if (g != null) str += "," + g;
    if (h != null) str += "," + h;
    if (i != null) str += "," + i;
    debugPrintln(str);
    return;
    }
    Last edited by futurenets; 01-21-2013, 06:27 AM.
    Paul Williams
    Strategy & Applications
    www.futurenets.co.uk

  • #2
    I believe that the efs has to be loaded on to a chart to output functions like getMonth(0) etc since they require data from the chart. Then the output goes to the "Formula Output Window".

    Wayne
    Last edited by waynecd; 01-22-2013, 03:07 AM.

    Comment


    • #3
      ok thanks Wayne but

      function main()
      {
      debugPrintln("db");
      }

      doesn't work either
      Paul Williams
      Strategy & Applications
      www.futurenets.co.uk

      Comment


      • #4
        did you find a solution? I can't get v11 to use debugPrint but can in v10.6
        Paul Williams
        Strategy & Applications
        www.futurenets.co.uk

        Comment


        • #5
          That is because your internal function "db" contains bar dependent Date objects like "getMonth(0)" which require that the script be loaded on a chart for debugPrint to work.

          If you just check the script in the "Script Editor" it will do a syntax check but it won't output the debugPrint because there are no bars from which to get the date object data.

          So, to test the script, open the "Formula Output" window and load the script onto a chart.

          I tested it again and debugPrint outputs to the "Formula Output" wndow correctly.

          Wayne
          Click image for larger version

Name:	x.png
Views:	1
Size:	70.4 KB
ID:	242839
          Last edited by waynecd; 01-22-2013, 06:30 AM.

          Comment


          • #6
            ok thanks Wayne. I understand. But

            function main()
            {

            debugPrintln("db");

            return null;
            }

            doesn't work either. again unless I'm missing something.
            Paul Williams
            Strategy & Applications
            www.futurenets.co.uk

            Comment


            • #7
              I'm using v11. v10.6 works ok
              Paul Williams
              Strategy & Applications
              www.futurenets.co.uk

              Comment


              • #8
                I must be looking for output in the wrong window
                Paul Williams
                Strategy & Applications
                www.futurenets.co.uk

                Comment


                • #9
                  if you look at both the script editor output and the formula output window in my last post you will see "db" by itself on its own line.
                  So at least for me it outputs fine.

                  I'm using the Dec 18 version (latest) of ver 11.5

                  Wayne

                  Comment


                  • #10
                    thanks Wayne. just looking in wrong window.
                    Paul Williams
                    Strategy & Applications
                    www.futurenets.co.uk

                    Comment


                    • #11
                      I'm having the same problem outputing to the Formula Output window

                      I've debugged efs scripts in the past by printing to the formula output window, and now I can't get a simple debugprintln() to output a string.

                      Interestingly, if I click on Verify, I see a single debugprintln() output to the console.

                      This seems like a bug in the latest version of eSignal. Please advise.

                      Thanks,
                      Norm


                      Originally posted by futurenets View Post
                      thanks Wayne. just looking in wrong window.
                      Last edited by nleitman; 01-23-2013, 08:21 AM.

                      Comment


                      • #12
                        Hi Norm,

                        It's likely a programing issue. Note that debugPrint etc don't work in postMain().

                        Without a relevant code snipet it's hard to guess what's going on.

                        Wayne

                        Comment

                        Working...
                        X