Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

Commented Issue: Problems using WindowsScriptEngineFlags.EnableDebugging [36]

0
0
I have code that executes fine on my machine with Visual Studio installed but have passed the code (compiled) including ClearScript.DLL to someone else who is getting an error when the script runs. I have tracked it down that if I remove the EnableDebugging I do not see the crash. But I need this option to get Column and Line numbers for errors in user scripts.

Is this crash caused by a lack of VS on the other machine? If so how do I work around this? I ONLY have the debug option enabled for line and column numbers (running v5.3.9 - not yet tried v5.3.11 as I cannot reproduce so need my colleague to run with latest DLL!)

Stack Trace Info below
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at Microsoft.ClearScript.Windows.ProcessDebugManagerWrapper32..ctor()
at Microsoft.ClearScript.Windows.ProcessDebugManagerWrapper.Create()
at Microsoft.ClearScript.Windows.WindowsScriptEngine.<>c__DisplayClass2.<.ctor>b__0()
at Microsoft.ClearScript.ScriptEngine.ScriptInvoke[T](Func`1 func)
at Microsoft.ClearScript.Windows.WindowsScriptEngine..ctor(String progID, String name, WindowsScriptEngineFlags flags)
at Microsoft.ClearScript.Windows.VBScriptEngine..ctor(String progID, String name, WindowsScriptEngineFlags flags)
at Microsoft.ClearScript.Windows.VBScriptEngine..ctor(String name, WindowsScriptEngineFlags flags)
MY ENTRY POINT -> at Configurator.ScriptProcessor.EnableAPI(API api)


Comments: As suspected, JScript and VBScript cannot enable their debugging features unless a suitable script debugger is available. Unfortunately script stack trace support is one of those features. In theory a script-enabled application can plug its own debugger into the Windows Script infrastructure, but implementing a script debugger is outside the scope of the ClearScript project. We do feel that ClearScript should transition gracefully into non-debug mode when a debugger is not present, and we'll use this issue to track that fix. Thanks!

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images