PDA

View Full Version : Qt Creator debugger does not stop on breakpoints in non-Qt console applications? Bug?



Zingam
18th April 2011, 07:28
Qt Creator debugger does not stop on breakpoints in non-Qt console applications? Is this a bug or a feature?

If I have this:


#include <QtCore/QCoreApplication>

int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);

return a.exec();
}

Breakpoints work but if I remove the Qt stuff the debugger does not stop on the breakpoints anymore.

squidge
18th April 2011, 07:45
If you remove the Qt stuff from the above example then there is nothing to breakpoint on, as its probably all optimised out.

Zingam
18th April 2011, 08:36
Well, I have functions and stuff. The quote above was just to show what I'm removing. I want to brake and trace into these functions but the debugger passes over them if I'm just doing something like this:

#include <iostream>
#include "mylib.h>
int main(int argc, char *argv[])
{

doSomething();
cout << "something";
doSomething2();



return 0;
}

The debugger works on the following as expected:

#include <QtCore/QCoreApplication>
#include "mylib.h"

int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);

doSomething();
cout << "something";
doSomething2();


return a.exec();
}


The same code in VS has no problems. So I guess it is a Qt Creator feature.