Forum Discussion

AmolGawali's avatar
AmolGawali
Occasional Contributor
11 days ago
Solved

getting error the JavaScript debugger does not support the 'Set Next Statement' command

 I am getting below error on windows server 2025.
i have installed Testcomplete version 15.75.22.7 

when in debug mode, getting this error, when wants to "set next statement"


TestComplete
---------------------------
Currently, the JavaScript debugger does not support the 'Set Next Statement' command.

 

  • This is documented here...  

    Notes:

    The Set Next Statement and Set Next Operation commands only work within the bounds of the current routine or keyword test. You cannot move the execution to another routine, unit, or test.

    Since the script debugger cannot step through individual statements within a script line, it will execute the whole line to which you jump.

    Changing the current line or keyword test operation may cause errors in your script or keyword test. This may happen, for instance, if the skipped test section creates certain objects or assign values to variables, and the statements or operations, to which you jump, work with these objects or variables (the “new” statements may be unable to retrieve or set objects’s properties or process the variable values).

    The “Set Next Statement” debugger command is not supported by Python and JavaScript (not JScript) engines.


    https://support.smartbear.com/testcomplete/docs/testing-with/debugging/running/setting-next-execution-point.html?sbsearch=Set%20Next%20Statement

    ... If you find my posts helpful drop me a like! 👍 Be sure to mark or post the solution to help others out and/or to credit the one who helped you. 😎

10 Replies

  • scot1967's avatar
    scot1967
    Icon for Champion Level 1 rankChampion Level 1

    This is documented here...  

    Notes:

    The Set Next Statement and Set Next Operation commands only work within the bounds of the current routine or keyword test. You cannot move the execution to another routine, unit, or test.

    Since the script debugger cannot step through individual statements within a script line, it will execute the whole line to which you jump.

    Changing the current line or keyword test operation may cause errors in your script or keyword test. This may happen, for instance, if the skipped test section creates certain objects or assign values to variables, and the statements or operations, to which you jump, work with these objects or variables (the “new” statements may be unable to retrieve or set objects’s properties or process the variable values).

    The “Set Next Statement” debugger command is not supported by Python and JavaScript (not JScript) engines.


    https://support.smartbear.com/testcomplete/docs/testing-with/debugging/running/setting-next-execution-point.html?sbsearch=Set%20Next%20Statement

    ... If you find my posts helpful drop me a like! 👍 Be sure to mark or post the solution to help others out and/or to credit the one who helped you. 😎

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion Level 3

    What are the lines of code you are stepping through, while debugging?

  • AmolGawali's avatar
    AmolGawali
    Occasional Contributor

      if(Aliases.AvocetVM.ObjDeleteDialogue.WaitProperty("Exists",true,10000))
       {
        var DeleteMsg = Aliases.AvocetVM.ObjDeleteDialogue.ObjDeleteMsg;
        
        if(DeleteMsg.Exists)
           Aliases.AvocetVM.ObjDeleteDialogue.ObjYesButton.Click();
        else
            LogAsError("Delete message is not displayed");
       }
       else
        LogAsError("Delete dialogue is not displayed");
        
        Delay(3000,"Waiting for page to reload");

          var DeleteFlag = VerifyItemPresent("AutoSanity_item");
          if (DeleteFlag == false)
            LogAsCheckpoint("Item is deleted successfully");
          else
            LogAsError("Item is not deleted");

    I have bookmarked the first line .. and want to jump to " var DeleteFlag" line 
    i.e. wants to use the "Set Next Statement"

    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3

      By the looks of it, "Set Next Statement" while debugging is not supported in Python and JavaScript!

      If you have added a breakpoint on the first line, instead of stepping-over each line of code via F10, you can position the cursor on the appropriate line you are interested in i.e. var DeleteFlag, and then select 'Run to Cursor' or F4. It will then continue debugging from your cursor position.

    • scot1967's avatar
      scot1967
      Icon for Champion Level 1 rankChampion Level 1

      I have bookmarked the first line .. and want to jump to " var DeleteFlag" line 
      i.e. wants to use the "Set Next Statement"

      Since this operation isn't supported in JS by TestComplete (see the first reply to this post 😉) you could temporarily comment out the code you want to skip, set breakpoints and step through. 

       

    • scot1967's avatar
      scot1967
      Icon for Champion Level 1 rankChampion Level 1

      I also see issues with the curly braces in your If statements.  Is this the problem you are debugging?

      • AmolGawali's avatar
        AmolGawali
        Occasional Contributor

        I have missed Curly braces to paste here; this is just piece of code for an example.

  • scot1967's avatar
    scot1967
    Icon for Champion Level 1 rankChampion Level 1

    TestComplete does not support this in JavaScript.  It is available in the right click menu but is not supported for debugging JavaScript.  Ref: the link in my previous post.  Please let me know if I am missing something here.  🤔




     

  • AmolGawali's avatar
    AmolGawali
    Occasional Contributor

    When i was in the previous version i.e.14.73 with the same code and framework it was working fine, still i am using it, and "Set Next Statement " works fine for me in that version.

    • scot1967's avatar
      scot1967
      Icon for Champion Level 1 rankChampion Level 1

      I am not sure about how that was working. 🤔  I am on Version: 15.74.33.7 x64 using JavaScript and see the issue you described.  The documentation also states this isn't supported in debug mode for JavaScript or Python.