Results 1 to 8 of 8

Thread: Breakpoints set at a slot will not stop?

  1. #1
    Join Date
    Apr 2010
    Posts
    98
    Thanks
    19
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question Breakpoints set at a slot will not stop?

    When I debug my app,I set a breakpoint at a slot.When it runs,the slot will first be called just as normal functions.It stops as expected.I also connect a button's clicked() signal to the slot.So when I click on that button,the slot will be called.The slot does be called,but it never stop at the breakpoint.
    Anybody knows why?Or do I miss something?
    It's not the goodbye that hurts,but the flashback that follow.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Breakpoints set at a slot will not stop?

    Are you running in debug mode or release mode?

  3. #3
    Join Date
    Apr 2010
    Posts
    98
    Thanks
    19
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Breakpoints set at a slot will not stop?

    I'm running in debug mode,because it stops at the beginning,but not at when the slot is triggered.
    It's not the goodbye that hurts,but the flashback that follow.

  4. #4
    Join Date
    Dec 2009
    Posts
    29
    Thanks
    2
    Thanked 3 Times in 3 Posts

    Default Re: Breakpoints set at a slot will not stop?

    Same thing just happenned to me. Of course I verified the slot is actually called by setting the text of a label when it is called but I dont know what I could of done to cause this issue. tried another project and theres no problems there so its something in the project.


    FOUND MY PROBLEM: When I added the following to my .pro file it created the problem:

    OBJECTS_DIR = ./ObjectsDir
    MOC_DIR = ./MocDir
    UI_DIR = ./UiDir


    Seems when the object,_moc or ui_ files are stored in separate folders GDB doesnt like It or needs further config.

    As soon as I removed those directives I was fine....not before I got frustrated though _

    The problem was the displaced moc_ files. So I removed MOC_DIR = ./MocDir


    OBJECTS_DIR = ./ObjectsDir
    UI_DIR = ./UiDir

    I suggest you do a clean all, delete your Makefile, run QMake then build all. This could solve the issue. If not then try to start a new project and see if the problem is still there. If not then transfer you files little by little until the problem arrives or until you have transferred everything and the problem is no more.
    Last edited by yodasoda; 19th May 2010 at 05:48.

  5. #5
    Join Date
    Apr 2010
    Posts
    98
    Thanks
    19
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Breakpoints set at a slot will not stop?

    Quote Originally Posted by yodasoda View Post
    OBJECTS_DIR = ./ObjectsDir
    MOC_DIR = ./MocDir
    UI_DIR = ./UiDir
    I don't have these lines.
    In my case,the ui_xxx.h files are in the same folder of the xxxx.ui files.
    And the moc_xxxx.cpp files and the xxx.o files are in the "debug" folder.
    Is it the same as your file structure?
    It's not the goodbye that hurts,but the flashback that follow.

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Breakpoints set at a slot will not stop?

    Have you tried a complete rebuild and ensured that optimisation is set to none?

  7. #7
    Join Date
    Dec 2009
    Posts
    29
    Thanks
    2
    Thanked 3 Times in 3 Posts

    Default Re: Breakpoints set at a slot will not stop?

    Quote Originally Posted by MorrisLiang View Post
    I don't have these lines.
    In my case,the ui_xxx.h files are in the same folder of the xxxx.ui files.
    And the moc_xxxx.cpp files and the xxx.o files are in the "debug" folder.
    Is it the same as your file structure?
    take those moc_xxx files out of debug and put them where your source files are

  8. The following user says thank you to yodasoda for this useful post:

    MorrisLiang (19th May 2010)

  9. #8
    Join Date
    Apr 2010
    Posts
    98
    Thanks
    19
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Breakpoints set at a slot will not stop?

    What is the optimisation?How do I enable/disable it.
    It's not the goodbye that hurts,but the flashback that follow.

Similar Threads

  1. How to stop QThread?
    By vespasianvs in forum Qt Programming
    Replies: 3
    Last Post: 14th March 2010, 07:42
  2. Qt Creator doesn't stop at breakpoints
    By TheSaw in forum Qt Tools
    Replies: 3
    Last Post: 12th May 2009, 16:53
  3. Replies: 0
    Last Post: 18th March 2009, 12:56
  4. Stop the thread
    By santosh.kumar in forum Qt Programming
    Replies: 1
    Last Post: 14th May 2007, 11:29
  5. signal slot conection using a string, not a SLOT
    By rianquinn in forum Qt Programming
    Replies: 6
    Last Post: 5th February 2006, 19:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.