Results 1 to 4 of 4

Thread: QString is not shown properly in Watch (Qt Add-in 1.1.5 for Visual Studio 2008)

  1. #1
    Join Date
    Aug 2010
    Posts
    22
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Question QString is not shown properly in Watch (Qt Add-in 1.1.5 for Visual Studio 2008)

    Hi, when I debug in VS2008, the string in QString is only automatically shown in the Locals window. But the string is not shown in Watch and Autos, as well as when I point a QString with mouse.

    Is this normal? Or some setting is wrong?

    I have checked the autoexp.dat (C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Packages\Debugger\autoexp.dat) file but can't find anything unusual.

    Thanks.

    Environment: Visual Studio Team System 2008, Qt Add-in 1.1.5, Qt 4.7 beta2, Windows 7 Ultimate 64-bit

    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: QString is not shown properly in Watch (Qt Add-in 1.1.5 for Visual Studio 2008)

    I don't know if you can change it, but yes, that is normal.
    When you try GDB on linux for example, it will also give you the address of the QString object. To see the actual string, you need to print the data member.

    Debuggers don't know what QString is. So you need to tell the debugger explicitly what to show (like in your locals view)

  3. #3
    Join Date
    Aug 2010
    Posts
    22
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QString is not shown properly in Watch (Qt Add-in 1.1.5 for Visual Studio 2008)

    Thanks. But I just found out that my other machine shows the string in QString automatically in Autos, Locals and Watch.
    The contents of both autoexp.dat are the same.

    For the machine that didn't work, I had to add this after [AutoExpand] in autoexp.dat:
    QString=<d->data,su>

    I understand that if an entry exist in both [AutoExpand] and [Visualizer], the Visualizer entry will override the AutoExpand entry. I think something is blocking the QString Visualizer to work in Watch and Autos. But that something is not blocking it to work in Locals.
    Last edited by jezz; 12th August 2010 at 04:05.

  4. #4
    Join Date
    Aug 2010
    Posts
    22
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QString is not shown properly in Watch (Qt Add-in 1.1.5 for Visual Studio 2008)

    The problem is solved. Did a /resetuserdata and all QString are shown properly now.
    "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /resetuserdata

Similar Threads

  1. QT4 not working in Visual Studio 2008
    By mnemonic69 in forum Installation and Deployment
    Replies: 4
    Last Post: 27th May 2010, 06:37
  2. Qt 4.6.1 and Visual Studio 2008[SOLVED]
    By ^NyAw^ in forum Installation and Deployment
    Replies: 0
    Last Post: 15th February 2010, 17:19
  3. Visual Studio 2008 and Qt
    By konx in forum Installation and Deployment
    Replies: 2
    Last Post: 22nd January 2010, 22:24
  4. How to use Qt with Visual Studio 2008?
    By N3wb in forum Installation and Deployment
    Replies: 2
    Last Post: 13th August 2009, 17:23
  5. Qt 4.3.2 + Visual studio 2008
    By moowy in forum Installation and Deployment
    Replies: 6
    Last Post: 6th December 2007, 07:41

Tags for this Thread

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.