User forums > Using Code::Blocks
Breakpoint is ignored
(1/1)
testalucida:
Hi,
I'm using the Code::Blocks build Dec 13, 2006 and the MinGW-Compiler.
I set a breakpoint, but it is always ignored. This is my code (breakpoint is in line "slider->setValue(0);" ):
--- Code: ---#include <QApplication>
#include <QWidget>
#include <QFont>
#include <QLCDNumber>
#include <QPushButton>
#include <QSlider>
#include <QVBoxLayout>
class MyWidget : public QWidget
{
public:
MyWidget(QWidget *parent = 0 );
protected:
private:
};
MyWidget::MyWidget(QWidget *parent)
: QWidget(parent)
{
QPushButton *quit = new QPushButton(tr("Quit"));
quit->setFont(QFont("Times", 18, QFont::Bold));
QLCDNumber *lcd = new QLCDNumber(2);
lcd->setSegmentStyle(QLCDNumber::Filled);
QSlider *slider = new QSlider(Qt::Horizontal);
slider->setRange(0, 99);
slider->setValue(0); //the line with the breakpoint
connect(quit, SIGNAL(clicked()), qApp, SLOT(quit()));
connect(slider, SIGNAL(valueChanged(int)),
lcd, SLOT(display(int)));
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(quit);
layout->addWidget(lcd);
layout->addWidget(slider);
setLayout(layout);
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyWidget widget;
widget.show();
return app.exec();
}
--- End code ---
Why is that??
The build option "Produce debugging symbols" is set.
Thanks in advance
testalucida
Pecan:
//-- Wiki Index
CodeBlocks Wiki Index
//-- Wiki Main Page
CodeBlocks Wiki Main Page
Debugging with CodeBlocks
See the workaround for breakpoints in constructors/destructors at the bottom of the wiki entry.
testalucida:
Hi Pecan,
thanks a lot - works fine now.
Have a nice day
testalucida
Navigation
[0] Message Index
Go to full version