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

Originally posted by AmolGawali on June 09, 2025

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.

Originally posted by scot1967 on June 10, 2025

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! :+1: Be sure to mark or post the solution to help others out and/or to credit the one who helped you. :smiling_face_with_sunglasses:

Originally posted by rraghvani on June 10, 2025

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

Originally posted by AmolGawali on June 11, 2025

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”

Originally posted by scot1967 on June 11, 2025

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. :thinking:

Originally posted by rraghvani on June 11, 2025

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.

Originally posted by scot1967 on June 11, 2025

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 :wink:) you could temporarily comment out the code you want to skip, set breakpoints and step through.

Originally posted by scot1967 on June 11, 2025

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

Originally posted by AmolGawali on June 11, 2025

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

Originally posted by AmolGawali on June 11, 2025

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.

Originally posted by scot1967 on June 11, 2025

I am not sure about how that was working. :thinking: 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.