Results 1 to 4 of 4

Thread: Debugging in Windows

  1. #1
    Join Date
    May 2006
    Posts
    58
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Debugging in Windows

    I have had a bug in my program since August detailed here:

    http://www.qtcentre.org/forum/f-qt-p...lot-15547.html

    I still haven't been able to fix it, and I'm out of ideas. I have been building this project under Linux/gcc and Windows/MingW.

    Now I am building in MSVC so I can use the debugger to step through my code, but I can't figure out how to set up the project. I have everything working using nmake, but I have no idea how to get source-level debugging working. Are there any tuturials out there in setting up MSVC projects for debugging QT apps?

  2. #2
    Join Date
    Jul 2008
    Posts
    69
    Thanks
    9
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Debugging in Windows

    you could use the console to send messages
    for that add to your .pro this line
    Qt Code:
    1. win32:CONFIG += console
    To copy to clipboard, switch view to plain text mode 

    and use qdebug() inside your code
    Qt Code:
    1. qDebug() <<"message";
    To copy to clipboard, switch view to plain text mode 

    then follow the display in your console while running

    Alternatively you could use the debug mode, I tested it under QT-creator it works fine for me (vista + Qt4.4.3 +ming) but I don't know with MS studio.

    I hope this help

  3. #3
    Join Date
    May 2006
    Posts
    58
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Debugging in Windows

    I had trouble getting it to work in Visual Studio .NET, but I was able to get everything working in the debugger with Visual Studio 6.0

    Basically you have to run qmake as follows:

    qmake -t vcapp -o myproject.dsp myproject.pro

    This produces a .dsp file that you can pull into developer studio, and this will allow you to perform source-level debugging, breakpoints etc.

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Debugging in Windows

    May be this thread will help you ...

Similar Threads

  1. Problem debugging Windows QT App w/ GDB
    By JDTexas in forum Qt Programming
    Replies: 4
    Last Post: 2nd March 2008, 09:02
  2. ide which supports debugging qt4.3.3 in windows
    By sakthi in forum Qt-based Software
    Replies: 2
    Last Post: 28th January 2008, 13:36
  3. Program crashes with assert error in xcb_lock.c
    By Valheru in forum Qt Programming
    Replies: 3
    Last Post: 18th November 2007, 20:56
  4. KDE 3.5.0 crash while opening project
    By MarkoSan in forum KDE Forum
    Replies: 2
    Last Post: 19th October 2007, 17:21
  5. Debugging in Windows
    By Doug Broadwell in forum Newbie
    Replies: 4
    Last Post: 29th November 2006, 02:58

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.