def CreateApplicationNode(self, node, containerProvider): realNode = self.app.CreateApplicationNode() document = documents.DebugDocumentText(node.cont) document = _wrap(document, axdebug.IID_IDebugDocument) node.cont.debugDocument = document provider = documents.DebugDocumentProvider(document) provider = _wrap(provider, axdebug.IID_IDebugDocumentProvider) realNode.SetDocumentProvider(provider) containerProvider.AddCodeContainer(node.cont, realNode) return realNode
def AddScriptBlock(self, codeBlock): # If we dont have debugging support, dont bother. cc = DebugCodeBlockContainer(codeBlock, self.scriptSiteDebug) if self.IsSimpleHost(): document = documents.DebugDocumentText(cc) document = _wrap(document, axdebug.IID_IDebugDocument) provider = documents.DebugDocumentProvider(document) provider = _wrap(provider, axdebug.IID_IDebugDocumentProvider) cc.debugDocument = document newNode = self.debugApplication.CreateApplicationNode() newNode.SetDocumentProvider(provider) newNode.Attach(self.rootNode) else: newNode = None # Managed by smart host. self.codeContainers[cc.sourceContext] = cc self.ccProvider.AddCodeContainer(cc, newNode)