如何在Code :: Blocks中调试独立文件? [英] How to debug standalone file in Code::Blocks?

查看:158
本文介绍了如何在Code :: Blocks中调试独立文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Code :: Blocks进行编程。我设置了一些断点,但是在运行程序时Code :: Blocks似乎忽略了它们。

I'm programming using Code::Blocks. I set some breakpoints, but Code::Blocks seems to ignore them when I run the program.

通过启动程序,我的意思是简单地单击(构建并运行)。

By 'start the program' I mean simply clicking (Build and run).

我检查了调试,发现 F8 不可用(开始/继续):

I checked under Debug and saw that F8 isn't available (Start / Continue):

程序可以编译并正常运行,它只是忽略断点。有人知道如何解决吗?

The program compiles and runs fine, it just ignores breakpoints. Does anybody know how to solve this?

注意:我检查了这里,我认为建议的答案与我无关,因为在编译器设置中,我只有 C:\MinGW 编译器的安装目录下。

Note: I checked here and I think the suggested answer isn't relevant for me, because in Compiler settings I have just "C:\MinGW" under Compiler's installation directory.

编辑:

我正在使用Windows 8(64位),代码::块12.11

I'm using Windows 8 (64bit), Code::Blocks 12.11

推荐答案

我猜您正在尝试调试独立文件(不属于项目的文件)。 Code :: Blocks不支持调试此类文件。尝试将要编译的文件包含为一个空项目或其他内容的一部分。

I guess you were trying to debug a standalone file (file not belonging to a project). Code::Blocks doesn't support debugging such files. Try including the file to be compiled as a part of an empty project or something.

这篇关于如何在Code :: Blocks中调试独立文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆