远程调试非托管代码
我有一个包含 C# 代码、C++\CLI 代码和本机 C++ 代码的进程。 现在,我正在尝试远程调试我的进程,我可以转到我的 C# 代码和 C++\CLI 代码的语句,但我无法访问我的本机代码。
当我尝试在本机 C++ 源文件中命中断点时,出现“未加载任何符号”错误。我尝试手动加载符号(工具->选项->调试),但没有成功。
有什么想法吗?
I have a process that contains C# code, C++\CLI code and native c++ code.
Now, I'm trying to remote debug my process, and I can go to the statements of my C# code and my C++\CLI code, but I can't reach my native code.
When I try to hit a breakpoint in my native c++ source file, I get the "No symbole have been loaded" error. I tried to manualy load the symboles (tools->options->debugging), but no luck.
Any Idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在“调试:附加到进程”对话框中,查找对话框中间的“附加到:”字段。您可以在此处选择是否使用本机调试器、托管代码调试器、脚本调试器等附加到目标进程。我相信,默认设置通常会优先考虑托管代码。
您无法同时调试本机代码和托管代码。要调试本机代码,您需要在附加到远程进程时显式选择本机代码。
In the Debug: Attach To Process dialog, look for the Attach To: field about middle of the dialog. This is where you can select whether to attach to the target process using the native debugger, managed code debugger, script debugger, etc. The default usually gives preference to managed code, I believe.
You can't debug native code and managed code at the same time. To debug native code, you'll need to explicitly select Native code when you attach to the remote process.