远程调试非托管代码

发布于 2024-08-27 15:30:42 字数 199 浏览 3 评论 0原文

我有一个包含 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一曲琵琶半遮面シ 2024-09-03 15:30:42

在“调试:附加到进程”对话框中,查找对话框中间的“附加到:”字段。您可以在此处选择是否使用本机调试器、托管代码调试器、脚本调试器等附加到目标进程。我相信,默认设置通常会优先考虑托管代码。

您无法同时调试本机代码和托管代码。要调试本机代码,您需要在附加到远程进程时显式选择本机代码。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文