直接生成DLL工程的Release版本如何调试

时间:2024-10-13 21:58:25

1、直接生成DLL工程的Release版本,是无法用F5调试的,比如说,在Release状态下,按下F5,系统会出现提示:

直接生成DLL工程的Release版本如何调试

2、以下几步中我将阐明解决办法。(1)调出Configuration Manager。

直接生成DLL工程的Release版本如何调试

3、得到Configuration Manager对话框

直接生成DLL工程的Release版本如何调试

4、(2)创建一种新的Solution Configuration。

直接生成DLL工程的Release版本如何调试

5、自定义一个Name,在这里我命名为Release_Debug,在Copy settings from中,选择Release。

直接生成DLL工程的Release版本如何调试

6、(3)进行工程属性的设置。① 将Output Directory设置为..\..\..\bin\release\plugin

直接生成DLL工程的Release版本如何调试

7、② 訇咀喃谆将Configuration Properties -> Debugging中的Command改为..\..\..\bin\release\FirstTest.ex髫潋啜缅e,将Working Directory改为..\..\..\bin\release,将Bebugger Type改为Native Only。(使用Native方式就能实现跨语言调试)

直接生成DLL工程的Release版本如何调试

8、③ 将C/C++ -> Optimization中的Optimization修改为Disabed。

直接生成DLL工程的Release版本如何调试

9、至此,设置成功,按下F5,发现已经可以调试啦!

直接生成DLL工程的Release版本如何调试
© 手抄报圈