Visual Studio 2010 连接到 Python 进程
我正在使用 VS 2010 附加到通过 ctypes 调用 DLL 的 Python 脚本。
我可以附加到该进程,并在“模块”视图下可以看到 DLL 及其关联的 PDB。这些路径直接通向解决方案输出文件夹,该文件夹恰好是“.../Debug/bin”。我正在从同一文件夹运行脚本。
当我尝试设置断点时,我收到“没有与此行关联的可执行代码”。
据我所知,DLL 是在调试配置而不是发布版本中构建的(在属性/C-C++/优化优化已禁用 (/Od) 下)。但是,在“模块”视图中,“优化”列显示“是的”。
谢谢,
肯尼
I'm using VS 2010 to attach to a Python script that is calling a DLL via ctypes.
I can attach to the process and under the "Modules" view I can see the DLL and it's associated PDB. The paths lead right to the solutions output folder which happens to be ".../Debug/bin". I'm running the script from this same folder.
When I try to set a breakpoint I get "No executable code is associated with this line."
As best as I can tell the DLL is built in a debug configuration rather than a release (under Properties/C-C++/Optimization optimization is disabled (/Od). However, in the "Modules" view the "Optimized" column displays "Yes".
Thanks,
Kenny
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您使用 VS 2010 时,请安装几个月前发布的 Python Tools for Visual Studio 扩展。太棒了。
安装此软件后,您应该能够直接调试脚本。
http://pytools.codeplex.com/
As you are using VS 2010, install the Python Tools for Visual Studio extension that was released a few months ago. It is awesome.
With this installed you should be able to debug your script directly.
http://pytools.codeplex.com/