Announcement

Collapse
No announcement yet.

Can I *step* thru java script?

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

  • Can I *step* thru java script?

    I am caught in an endless loop on an efs that I am trying to write. I seam to remember from my rudimentary programming in my past, that I was able to *step* thru each line of code as if it excuted. Can this be done with java script?

    If not, maybe I should break down the efs, into user defined functions and block out, with /*...*/, all but one function. Then unblock the next function, one at a time, untill I see where the problem is?

    Thoughts please?

  • #2
    Hello jethro87,

    We do not currently have a step-through debugging option for EFS. Please see my reply to a similar question here for some more details.

    As far as debugging EFS, in addition to what you have described you can also use the debugPrintln() function. Place the following two lines somewhere near the top of main().

    debugPrintln(getCurrentBarIndex());
    return;

    Run the formula and see if it executes to this point without any endless looping. If it does, you'll see the bar index values that were processed in the Formula Output Window. Clear the FOW and move these two lines down in the order of process to another logical point and run the formula again. Keep moving the debug and return statement further down in the order of process until nothing prints in the FOW or the endless loop is encountered. This process will help you narrow down the problem section of code. Once you've identified the problem section, remove the return statement and move your debug statement to the line just above the problem section and start scrutinizing the functions and variable data that are being used in the problem section of code. Build some strings using your variables in the debug statement to verify that their values are what you intended them to be. For example,

    debugPrintln("Index: " + getCurrentBarIndex() + " myVar: " + myVar);
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Place the following two lines somewhere near the top of main().

      debugPrintln(getCurrentBarIndex());
      return;

      Clear the FOW and move these two lines down in the order of process to another logical point and run the formula again. Keep moving the debug and return statement further down in the order of process until nothing prints in the FOW or the endless loop is encountered.

      Thanks for the idea JasonK. What you suggest is stepping thru. A little more work but it will get the job done.
      I had a few debugPrintln at the end of the efs to see what was going on but didn't think to put some at strategic point in the code.

      Thanks again.

      Comment


      • #4
        You're most welcome.
        Jason K.
        Project Manager
        eSignal - an Interactive Data company

        EFS KnowledgeBase
        JavaScript for EFS Video Series
        EFS Beginner Tutorial Series
        EFS Glossary
        Custom EFS Development Policy

        New User Orientation

        Comment

        Working...
        X