如何调试一个DLL项目
来源:互联网 发布:ug8.0编程免费视频教程 编辑:程序博客网 时间:2024/04/28 15:10
转自MSDN:http://msdn.microsoft.com/zh-cn/library/605a12zt(v=VS.100).aspx
中文设置:
若要从 DLL 项目而不是从调用应用程序启动调试,必须在“<项目> 属性页”对话框或窗口中输入信息以指示 DLL 项目在何处才能找到调用应用程序。C++“属性页”在布局和内容方面与 C# 和 Visual Basic“属性页”不同。请参考与项目语言相对应的过程。
如果托管 DLL 由本机代码调用,并且您想要调试两者,则必须同时启用托管调试器和本机调试器。可以在“<Project>属性页”对话框或窗口中设置此项。有关更多信息,请参见 如何:在混合模式下调试。
在 C++ 项目中指定调用应用程序
1. 在“解决方案资源管理器”中选择 DLL 项目。
2. 在“视图”菜单上选择“属性页”。
3. 在“项目 属性页”窗口中的“配置”下拉列表中,选择“调试”。
4. 打开“配置属性”文件夹并选择“调试”类别。
5. 在“要启动的调试器”列表中,选择“本地 Windows 调试器”或“远程 Windows 调试器”。
6. 在“命令”或“远程命令”框中单击下拉箭头,并从列表中选择“浏览”来找到应用程序。或者,键入应用程序的路径和名称。
7. 在“命令参数”框中键入所有需要的程序参数。
在 C# 或 Visual Basic 项目中指定调用应用程序
1. 在“解决方案资源管理器”中选择 DLL 项目。
2. 在“视图”菜单上选择“属性页”。
3. 在“项目 属性页”窗口中的“配置”下拉列表中,选择“调试”。
4. 单击“调试”选项卡。
5. 可通过执行以下任一操作来启动应用程序:
1. 将“启动操作”设置为“启动外部程序”。
2. 在“启动外部程序”框中,单击省略号按钮以通过浏览找到应用程序。
3. 在“命令行参数”框中输入所有需要的程序参数。
6. 或者,可以在 URL 处调用应用程序。(如果要调试本地 ASP.NET 应用程序所使用的托管 DLL,可能会需要使用此方法。)
1. 在“启动操作”下,选择“启动浏览器显示 URL:”单选按钮。
2. 在紧邻的文本框中,键入 URL。
从 DLL 项目中开始调试
1. 在“解决方案资源管理器”中选择 DLL 项目。
2. 根据需要设置断点。
3. 在“项目 属性页”对话框或窗口中输入调用应用程序的名称和位置。如果应用程序是控制台应用程序,请填写命令行参数(如果需要)。
英文设置:
To startdebugging from the DLL project instead of the calling application, you mustenter information in the <Project> Property Pages dialog box orwindow to indicate where the DLL project can find the calling application. The C++ PropertyPages differ in layout and content from the C# and Visual Basic PropertyPages. Refer to the procedure that corresponds to your project's language.
If a managed DLLis called by native code and you want to debug both, both managed and nativedebuggers must be enabled. You can set this in the <Project>Property Pagesdialog box or window. For more information, see How to: Debug in Mixed Mode.
To specify thecalling application in a C++ project
1. In Solution Explorer, select theDLL project.
2. On the View menu,choose Property Pages.
3. In the Project Property Pages window,in the Configuration drop-down list, choose Debug.
4. Open the Configuration Properties folder,and select the Debugging category.
5. In the Debugger to launch list,choose Local Windows Debugger or Remote Windows Debugger.
6. In the Command or RemoteCommand box, click the drop-down arrow, and select Browse fromthe list to locate the application. Alternatively, type the path and nameof the application.
7. Type any necessary program arguments inthe Command Arguments box.
To specify thecalling application in a C# or Visual Basic project
1. In Solution Explorer, select theDLL project.
2. On the View menu,choose Property Pages.
3. In the Project Property Pages window,in the Configuration drop-down list, choose Debug.
4. Click the Debug tab.
5. You can start the application by eitherdoing the following:
1. Set the Start Action to Startexternal program.
2. In the Start external program box,click the ellipsis button to browse for the application.
3. Enter any necessary program argumentsin the Command Line Arguments box.
6. Or, you can invoke an application at aURL. (You might wantto do this if you are debugging a managed DLL used by a local ASP.NETapplication.)
1. Under Start Action, selectthe Start browser in URL: radio button.
2. In the adjoining text box, type theURL.
To startdebugging from the DLL project
1. In Solution Explorer, select theDLL project.
2. Set breakpoints as needed.
3. Enter the nameand location of the calling application in the Project Property Pages dialogbox or window. If theapplication is a console application, fill in the command line arguments, if itis necessary.
- 如何调试一个DLL项目
- 如何:从 DLL 项目进行调试
- 调试 DLL 项目
- 调试 DLL 项目
- C++如何调试一个DLL类型的工程
- VC如何调试DLL
- 如何调试DLL?
- dll如何调试
- 如何进行DLL调试
- Codeblocks如何调试DLL
- 如何进入dll调试
- Delphi 中如何调试 DLL
- .net中如何调试DLL
- vs2005 如何调试wince dll
- Delphi 中如何调试 DLL
- vc2008中如何调试dll
- 如何调试注入的Dll
- vs2012,如何调试dll工程
- 用javascrip在asp.net中窗口相关操作总结
- C#操作excel(多种方法比较)
- 1007
- 给定的 ColumnMapping 与源或目标中的任意列均不匹配 与 从bcp 客户端收到的列长度无效 从excel导入SqlServer
- 对句柄本质的探讨
- 如何调试一个DLL项目
- Cocos2d开发资源大集合
- poj 3177(万恶的双连通)
- 二进制串模糊搜索的Java实现
- PHP中大整数取余返回负数的问题
- 文件检索算法
- maven
- win7组件服务COM+应用程序编录错误解决办法
- php解: 2005年百度之星程序设计大赛试题总决赛题目 ------八方块移动游戏