简体   繁体   English

尝试制作.dll插件,但通过程序进行调试时出现错误

[英]Trying to make a .dll plug-in but the debugging through program gives The error

Well, as the title says,i'm trying to make a .dll plug-in for a program called "EuroScope.exe". 好吧,正如标题所述,我正在尝试为名为“ EuroScope.exe”的程序制作一个.dll插件。 For the first couple of days i was just trying and trying to make one out of the templates(MFC DLL with Regular DLL using shared MFC DLL). 在最初的几天里,我只是试图从模板中制作一个(使用共享MFC DLL的带有常规DLL的MFC DLL)。

When that failed(i didn't understood why at the time) i tried to follow a Guide to make plug-ins specifically for this program and even though i opened a plug-in from the examples i couldn't start it. 当失败时(当时我不明白为什么),我尝试遵循指南来专门为此程序制作插件,即使我从示例中打开了一个插件也无法启动。 If i build and then open the .dll in the program it works but the thing is, i'll need to start it from scratch so i desperately need to debug and test it with the use of breakpoints. 如果我先构建然后在程序中打开.dll,它会起作用,但事实是,我需要从头开始启动它,因此我非常需要使用断点进行调试和测试。 And the problem is here, when i debug it through "EuroScope.exe" it says "Debugging information for 'Euroscope.exe' cannot be found or does not match. Binary was not built with debug information. Do you want to continue debugging? YES NO?" 问题就在这里,当我通过“ EuroScope.exe”进行调试时,它说“找不到或不匹配'Euroscope.exe'的调试信息。二进制文件不是用调试信息构建的。您要继续调试吗?是不是?” and the breakpoints say "The breakpoint will not currently be hit. No symbols have been loaded for this document" . 并且断点显示“该断点当前不会被命中。该文档尚未加载任何符号” I've literally searched and done hundreds of solutions to this and nothing works (not the "Re-install Visual Studio" however because personally i hate that solution and because my Visual Studio is working fine in the others areas). 我从字面上搜索并完成了数百个解决方案,但没有任何效果(但是“重新安装Visual Studio”无效,因为我个人讨厌该解决方案,而且我的Visual Studio在其他领域也能正常工作)。

What i expected,and as the Guide says: "It is possible to debug a plug-in. In the project properties dialog specify Euroscope as the command to be executed and then go and load the debug version of your DLL. You will be able to define breakpoints inside your DLL and debug as normal" 我所期望的,以及《指南》所说的:“可以调试插件。在项目属性对话框中,将Euroscope指定为要执行的命令,然后转到并加载DLL的调试版本。您将能够定义DLL内的断点并正常调试”

I'm getting really down about this because this is for my thesis and because of this problem i'm wasting time and i couldn't even start the plug-in making per se.... 我真的对此很沮丧,因为这是为了我的论文,并且由于这个问题,我浪费时间,甚至无法开始制作插件本身。

Please help me guys 请帮我

Thank you 谢谢

PS: 1 more information about the problem. PS:1有关此问题的更多信息。 When debugging(it i click yes to that problem) it says: 调试时(它对这个问题单击“是”)说:

'EuroScope.exe' (Win32): Loaded 'D:\Thesis\Euroscope\EuroScope.exe'.Module was built without symbols.
EuroScope.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'.Symbols loaded.
'EuroScope.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'.Symbols loaded.
....
....
'EuroScope.exe' (Win32): Loaded 'D:\Thesis\Euroscope\EuroScopePlugInDll.dll'.Cannot find or open the PDB file.
'EuroScope.exe' (Win32): Loaded 'C:\Windows\winsxs 22-\x86_microsoft.vc80.mfc_1fc8b
...

Do you think these lines have to do with the problem? 您认为这些路线与问题有关吗?

The output messages you show are normal when you are debugging a program you did not build. 调试未构建的程序时,显示的输出消息是正常的。 They do not indicate errors, only that you cannot set breakpoints in non-debug code. 它们不表示错误,只是不能在非调试代码中设置断点。

I assume that EuroScopePlugInDll.dll is your project and it builds successfully. 我认为EuroScopePlugInDll.dll是您的项目,并且构建成功。 To be able to debug it: (1) Make sure you are building a debug configuration, not a release configuration. 为了能够对其进行调试,请执行以下操作:(1)确保您正在构建调试配置,而不是发布配置。 (2) Make sure the dll file and the pdb file produced by your build are in the same directory. (2)确保生成的dll文件和pdb文件位于同一目录中。 You probably have to move them to the same directory as EuroScope.exe. 您可能必须将它们移动到与EuroScope.exe相同的目录。 With that you should be able to set breakpoints in the dll source code. 这样,您应该能够在dll源代码中设置断点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM