Results 1 to 2 of 2

Thread: Debug issue in QtCreator

  1. #1
    Join Date
    Jun 2012
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Debug issue in QtCreator

    Sometime when I want to debug a variable, I will see a scene as in the attachment picture.
    There are 2 variables have the same name (another 1 has a suffix of "@1") in Locals and Expressions window.
    The variable p_data is the variable that I wish to debug.
    It is a struct which contain a lot of data (QString, int, double, bool and etc).
    The value inside the variable are all random value & the value will not update in the watch window even I've execute some code like
    Qt Code:
    1. p_data.name = "ABC";
    To copy to clipboard, switch view to plain text mode 
    But when I show the data in GUI:
    Qt Code:
    1. ui->label->setText(p_data.name);
    To copy to clipboard, switch view to plain text mode 
    The label is able to show "ABC".
    That means the data is successful update into the variable but failed to debug it.
    Can I know why will this happened?
    Is my coding style got problem?
    My Qt version is Qt 4.8.0 for Desktop - MinGW (Qt SDK).
    Attached Images Attached Images

  2. #2
    Join Date
    Mar 2013
    Posts
    11
    Thanks
    6
    Qt products
    Qt4 Qt5
    Platforms
    Windows Android

    Default Re: Debug issue in QtCreator

    Did you try expanding the arrow before your variable in debug window<see attachment>.Additionally you can right click on variable in debug watch window and set "Add data breakpoint".
    Debug.png

Similar Threads

  1. Replies: 1
    Last Post: 2nd August 2011, 02:03
  2. QtCreator debug in console mode
    By stef13013 in forum Qt Tools
    Replies: 0
    Last Post: 8th February 2011, 16:34
  3. QTCreator Mac - Unable to debug properly?
    By regrant in forum Qt Programming
    Replies: 3
    Last Post: 28th October 2010, 23:29
  4. Qt Creator Where is the Debug->views (from menu bar) in QtCreator 2.0
    By ansmehta in forum Qt Tools
    Replies: 1
    Last Post: 21st July 2010, 23:50
  5. How do i debug in QtCreator?
    By payal in forum Qt Tools
    Replies: 6
    Last Post: 25th February 2010, 11:03

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.