Symptoms

  • You set breakpoints in a JavaScript file of a test, then start the test in the debugger.
  • The test runs to the end and never stops at any breakpoint.
  • The same test stops at breakpoints on Windows 10 and on Windows 11 versions earlier than 24H2.

Reason

Starting with Windows 11 version 24H2, Microsoft replaced the JScript engine (jscript.dll) with a new engine, JScript9Legacy.dll. The change is enabled by default for security reasons. The Rapise JavaScript debugger relies on debugging features of the classic JScript engine that the new engine doesn't fully support. As a result, breakpoints are never set.

Resolution

Turn off the JScript replacement policy so that Windows uses the classic JScript engine again.

  1. Close Rapise.

  2. Open a Command Prompt and run one of the following commands.

    For the current user only (no administrator rights needed):

     

    reg add "HKCU\SOFTWARE\Policies\Microsoft\Internet Explorer\Main" /v JScriptReplacement /t REG_DWORD /d 0 /f

    For all users on the machine (run the Command Prompt as Administrator):

     

    reg add "HKLM\SOFTWARE\Policies\Microsoft\Internet Explorer\Main" /v JScriptReplacement /t REG_DWORD /d 0 /f

    You can also make the change in Registry Editor. Go to HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Internet Explorer\Main or HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Main, creating the Internet Explorer and Main keys if they don't exist. Then add a DWORD (32-bit) value named JScriptReplacement and set it to 0.

  3. Start Rapise again. You don't need to reboot.

Note: This setting affects every application that uses JScript for that user or machine, not just Rapise. To undo the change, delete the value:

 

reg delete "HKCU\SOFTWARE\Policies\Microsoft\Internet Explorer\Main" /v JScriptReplacement /f

Use HKLM instead of HKCU in this command if you set the value for all users.

See also