IronPython PTVS测试调试:如何启用-X:跟踪和-X:帧

时间:2015-07-03 03:47:12

标签: python visual-studio debugging ironpython ptvs

所以我有一个非常简单的导入模块,我想在被叫二上进行单元测试。它有一个函数red,它只复制all()的功能。下面的代码运行正常,但是当我尝试调试它时,我得到:

Test Name:  test_tryStuff
Test Outcome:   Failed
Result StandardError:   
Traceback (most recent call last):
  File "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON TOOLS FOR VISUAL STUDIO\2.2\visualstudio_py_testlauncher.py", line 60, in <module>
  File "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON TOOLS FOR VISUAL STUDIO\2.2\visualstudio_py_testlauncher.py", line 39, in main
  File "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON TOOLS FOR VISUAL STUDIO\2.2\ptvsd\attach_server.py", line 151, in enable_attach
RuntimeError: IronPython must be started with -X:Tracing and -X:Frames options to support PTVS remote debugging.

我在哪里启用-X:跟踪和-X:帧?我尝试将-X:Tracing -X:在Debug下的解释器参数中的框架放在项目属性下,结果相同。我已经尝试过IronPython和Standard Python启动模式,结果相同。

代码:

import Two as Two
class SomeOtherTest(unittest.TestCase):
    def test_tryStuff(self):
        self.assertEqual(Two.red([True,True,True]),True)

0 个答案:

没有答案