1
Vote

Debug IronPython unit test in VS2012 gives error

description

Whenever I right click on the test case in IronPython editor or in test explorer to debug the test, Visual Studio always give me error message saying:

"Could not connect to remote Python process at 'localhost:#port'. Make sure that the process is running, and has called ptvsd.enable_attach()"

I am debugging locally, why did debugger try to use remote debugger?

In the error output, here is the error message:
RuntimeError: IronPython must be started with -X:Tracing and -X:Frames options to support PTVS remote debugging.

I am not trying to do remote debugging so I am not sure why it always complains process is not attached to debugger?

I am using IronPython 2.7.4 as interpreter. I have tried both .Net launcher and standard python launcher in debug setting. Neither one works for me.

I tried to set -X:Debug as interpreter argument but it did not help either.

comments

huguesv wrote Feb 13 at 3:03 AM

Thanks for letting us know! We'll have a look.

I can understand how that error message can be confusing. The test adapter actually uses remote debugging to implement debug test functionality.