https://www.alternetsoft.com.au/blog/integrating-script-debugger-into-your-application