VS与pycharm联合调试dll的问题与解决方案

在新设备上使用VS 2017 Enterprise + Pycharm 2018 Pro联合调试DLL时遇到警告,提示sys.settrace()可能导致调试器工作不正常。解决方案是避免使用VS自带的Python解释器,转而使用Anaconda作为Pycharm的解释器,问题得以解决。这表明可能是VS自带Python的兼容性问题,建议Pycharm和VS使用各自独立的Python环境。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题描述

之前的VS 2013 Ultimate + Pycharm 2017 Community联合调试调用dll没有问题。

但是最近在新设备上使用VS 2017 Enterprise + Pycharm 2018 Pro联合调试dll时报了bug:

PYDEV DEBUGGER WARNING:
sys.settrace() should not be used when the debugger is being used.
This may cause the debugger to stop working correctly.
If this is needed, please check: 
http://pydev.blogspot.com/2007/06/why-cant-pydev-debugger-work-with.html
to see how to restore the debug tracing back correctly.
Call Location:
  File "D:\JetBrains\PyCharm 2018.3.3\helpers\pydev\_pydevd_bundle\pydevd_comm.py", line 382, in _on_run
    r = self.sock.recv(1024)


PYDEV DEBUGGER WARNING:
sys.settrace() should not be used when the debugger is being used.
This may cause the debugger to stop working correctly.
If this is needed, please check: 
http://pydev.blogspot.com/2007/06/why-cant-pydev-debugger-work-with.html
to see how to restore the d

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值