I am writing a debugger for a VBScript host. My debugger is an external application. Everything is fine. I get a call to my IApplicationDebugger::onHandleBreakPoint handler. I can call IDebugApplication::ResumeFromBreakPoint and I can step through the code.
Also it is possible to set breakpoints before I run the script. Again IApplicationDebugger::onHandleBreakPoint is called. Also errors are handled. But now I want to set a new breakpoint while I am suspended in IApplicationDebugger::onHandleBreakPoint.
I have a marshaled pointer to IActiveScriptDebug. But when I call IActiveScriptDebug::EnumCodeContextsOfPosition the application blocks. This seams logical for me. The thread with the IActiveScript (IActiveScriptDebug) object resides in a different STA and is still blocked in the debugger as documented.
But what is the correct way to access the Language engine from my debugger thread. All I need is a IDebugCodeContext or IEnumDebugCodeContexts interface for a specific line of code. Am I missing a different interface that I can access to achive the same functionality.