|
发表于 2010-12-10 14:56
|
显示全部楼层
来自: 澳大利亚
被调试对象的动态加载,在Tools/Vitesse/Options/Debug script name中设置Debuger py文件路径,Debuger文件做如下修改:
def runfile(filename):
execfile(filename)
def StarDebugerInit():
import sys
import _winreg
key =_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,r"SOFTWARE\ARCHAEOPTERYX\WINGIDE\3.2\INSTALL")
winghome = _winreg.QueryValueEx(key,"WINGHOME")[0]
sys.path.append(winghome)
sys.path.append("%s\\bin" % winghome)
def StarDebugger(scriptfile):
import wingdbstub
import time
if wingdbstub.debugger != None:
wingdbstub.debugger.StopDebug()
time.sleep(1)
wingdbstub.debugger.StartDebug()
runfile(scriptfile)
if __name__ == '__main__':
StarDebugerInit()
scriptFileName = ""
if len(sys.argv) > 1:
if sys.argv[1] == "-script" and len(sys.argv) > 2:
scriptFileName = sys.argv[2]
StarDebugger(scriptFileName)
设置好后,可以通过Tools/Vitesse/Debug对已选择的script进行调试 |
|