VS 2005 Debug Configuration

Binary was not build with debug information.[@more@]Its not an installation issue, the problem is, as the error message suggests, that you have not built your project with debug information.

To do this:
1) Goto Project->Properties
2) Make sure "Configuration" at the top is "Debug"
3) On the left, select "C/C++", then "General"
4) On the right, change "Debug information format" to "Program Database for edit and continue (/ZI)"
5) On the left, Select "Optimization"
6) On the right, Change "Optimization" to "Disabled (/Od)"
7) On the left, select "Code Generation"
8) On the right, change "Runtime library" to "Multi-Threaded Debug (/MTd)"
9) On the left, expand "Linker" and select "Debugging"
10) On the right, change "Generate Debug info" to "Yes (/DEBUG)"
11) Rebuild your project.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/69498/viewspace-1008712/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/69498/viewspace-1008712/

在使用集成开发环境(IDE)进行软件开发时,调试配置(Debug Configuration)的缺失可能会导致无法正常启动调试会话。以下是一些常见IDE中如何恢复或创建调试配置的方法。 ### Visual Studio Code (VS Code) 在 VS Code 中,调试配置通常存储在 `.vscode/launch.json` 文件中。如果该文件丢失或配置不完整,可以通过以下方式恢复: 1. 打开项目文件夹后,点击左侧活动栏中的调试图标(或按下 `Ctrl+Shift+D`)。 2. 在调试侧边栏顶部,点击“创建 launch.json 文件”或“添加配置”按钮。 3. 系统将提示选择环境(如 Node.js、Python、C++ 等),选择合适的环境后,VS Code 会自动生成默认的 `launch.json` 文件。 4. 根据项目需求修改生成的配置,例如设置 `program`、`args`、`runtimeExecutable` 等字段。 示例 `launch.json` 配置(适用于 Python): ```json { "version": "0.2.0", "configurations": [ { "name": "Python: 调试器", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal", "subProcess": true, "redirectOutput": true } ] } ``` ### IntelliJ IDEA / Android Studio 在 IntelliJ IDEA 或 Android Studio 中,调试配置保存在 `.idea/runConfigurations/` 目录下的 XML 文件中。如果配置丢失: 1. 打开“Run/Debug Configurations”对话框(可通过菜单 Run > Edit Configurations... 打开)。 2. 点击左上角的“+”号,选择适当的配置类型(如 Application、JUnit、Remote JVM Debug 等)。 3. 填写主类、VM 参数、程序参数、工作目录等信息。 4. 点击“Apply”保存配置。 如果项目是基于 Maven 或 Gradle 的,也可以尝试重新导入项目以恢复配置。 ### Eclipse 在 Eclipse 中,调试配置保存在工作空间的 `.metadata/.plugins/org.eclipse.debug.core/.launches` 目录下: 1. 打开“Run”菜单,选择“Run Configurations...”或“Debug Configurations...”。 2. 点击对应配置类型(如 Java Application)并点击“New launch configuration”图标。 3. 填写主类、JRE、类路径等信息。 4. 点击“Apply”保存并关闭对话框。 此外,确保项目已正确设置为 Java 项目(或其他适用的项目类型),并包含 `main` 方法。 ### 其他注意事项 - 如果使用版本控制系统(如 Git),可以尝试从历史提交中恢复 `.vscode/launch.json` 或 `.idea/runConfigurations/` 中的配置文件。 - 对于 VS Code,若使用了扩展(如 C/C++、Python、Java 插件),请确保相关插件已正确安装并启用。 - 若调试器无法启动,检查终端输出以获取错误信息,可能提示缺少运行时或调试器可执行文件未找到。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值