我正在使用 Visual Studio 2012 来调试我的 IronPython 程序。我已经安装了 IronPython 和 PyTools。
在调试时,当我将鼠标悬停在一个变量上时,比如说tenants_path,显示的值是IronPython.Runtime.ClosureCell。为什么会这样?
我正在使用 Visual Studio 2012 来调试我的 IronPython 程序。我已经安装了 IronPython 和 PyTools。
在调试时,当我将鼠标悬停在一个变量上时,比如说tenants_path,显示的值是IronPython.Runtime.ClosureCell。为什么会这样?
要纠正这个问题,我需要右键单击解决方案,然后选择Properties.
在General选项卡中,确保将Interpreter其设置为IronPython 2.7。

在Debug选项卡中,确保Launch mode:设置为Standard Python launcher。

IronPython 默认不会为其生成的代码生成调试信息,因此 VS 只是尽力而为。
如果你正在运行ipy.exe,那么你应该使用-X:Debug命令行选项运行;如果要嵌入,则需要true在创建引擎时传递“调试”。