Hex Editor - Binary File Editing Software for Windows
Download Hex Editor Neo Hide this button

Script Execution

Script execution starts when the Debug » Run Script command is invoked. Hex Editor Neo performs the following actions when script starts executing:

  1. TypeScript compiler is used to compile the TypeScript source into JavaScript. Any compilation errors at this stage are immediately displayed in the Output Window and highlighted in the editor. Moreover, most syntax errors are highlighted in the editor even before the script is started. If script compilation fails, script is not running.

  2. Main script body is executed. If main code launches any non-asynchronous functions, they are completely executed. Any non-caught exceptions are displayed in the Output Window. All asynchronous functions as well as other delayed code may not complete execution at the time the main script body execution is finished. Uncaught exceptions terminate the script execution but do not put it into the stopped state. Delayed functions or asynchronous continuations may still continue to run.

  3. Any delayed execution code as well as asynchronous continuations may execute at any time until the script is stopped.

  4. Debug » Stop Script command must be used to stop script execution. This command completely stops script code execution and cancels any outstanding asynchronous continuations or delayed code. The script may also stop itself using the stopScript function.