Qt 创建者 CDB 不工作
我正在使用最新的 Qt SDK (2.4.0),但在让 Visual Studio 2008 CDB 正常工作时遇到问题。我遇到了以下两个我认为相关的问题
我有一个失败的断言。当该断言失败时,我会看到 Visual Studio 对话框询问我是否要中止、重试或忽略。如果我选择重试,程序不会按其应有的方式中断,而是继续执行。但是,如果我在该断言之前放置一个断点,然后在调试器中单步执行该行,那么当我点击“重试”时,程序会按预期中断。
在执行开始之前设置的所有断点都被正确命中。但是,如果我尝试在执行开始后添加断点,则该断点将被忽略。但是,如果在停止时添加更多断点,那么这些断点就会被正确命中。
看起来调试器只有在我用断点手动停止后才工作。有谁知道这是怎么回事?
我正在使用适用于 Windows 32 的 Windows 7 64 位 Qt SDK
I'm using the latest Qt SDK (2.4.0) and am having problems getting the visual studio 2008 CDB working properly. I have a experienced the following 2 problems which I think are related
I have an assert that is failing. When that assert fails I see the Visual Studio dialog box asking me if I'd like to Abort, Retry, or Ignore. If I choose Retry, the program does not break as it should, instead it just continues executing. However, if I put a break point before that assert, and then step over that line within the debugger then when I hit Retry the program does break as expected.
All break points that are in place before execution starts are hit correctly. However, if I attempt to add a break point after execution starts then that break point is ignored. But, if while stopped, I add more break points, then those are correctly hit.
It would appear that the debugger is only working once I manually stop it with a break point. Does anyone know what is going on here?
I'm using Windows 7 64 bit Qt SDK for Windows 32
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于你的第一个问题,我猜你没有分配你使用的“对象”。
例如:
如果您的调试器不起作用,您可以尝试添加:
和几个打印字符串。即:
对于你的最后一个问题,qtcreator 可以帮助你减少工作量。它并不比其他 IDE 做得更好,但它与 qt 集成。它可以帮助您避免大量的.pro文件配置。事实上,要正确调试您的应用程序,您应该在项目文件中定义:
或者至少:
qtcreator 会为您完成它。
For your first question I guess you doesn't allocate an "object" you use.
Something like:
if your debugger doesn't work you could try add:
and several print string. i.e.:
For your last question qtcreator helps you work less. It does not do something better then other IDE, but it's integrated with qt. It can help you avoid a lot of .pro file configuration. Infact to debug your app correctly you should define in your project file:
or at least:
qtcreator does it for your.