Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Debugging Qt source in Netbeans 8.1: how to inspect QStrings etc?
Forum Updated to NodeBB v4.3 + New Features

Debugging Qt source in Netbeans 8.1: how to inspect QStrings etc?

Scheduled Pinned Locked Moved Solved 3rd Party Software
4 Posts 2 Posters 2.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nulluse
    wrote on 7 Apr 2016, 18:03 last edited by nulluse 4 Jul 2016, 18:05
    #1

    Netbeans uses gdb to debug C++ code by default.
    This https://wiki.qt.io/IDE_Debug_Helpers describes how QStrings can be supported in several IDEs, but not in gdb/Netbeans.
    This recommends creating a macro file for gdb: https://zhjxue.wordpress.com/2009/03/14/how-to-show-value-of-qstring-in-gdb/
    And this speaks of supporting Qt5 QString differences (but not other classes): http://silmor.de/qtstuff.printqstring.php

    Would be nice if Qt could put out a guide for inspecting the Qt classes in gdb, which is a kind of popular debugger.

    1 Reply Last reply
    0
    • N Offline
      N Offline
      nulluse
      wrote on 11 Apr 2016, 14:48 last edited by nulluse 4 Nov 2016, 14:51
      #2

      A somewhat related question:

      If I dump debug info using qDebug() to the Netbeans output window, it dumps w/o carriage return.
      The next line is offset to the end of the previous and everything looks like stairs running out into the right side of the screen.
      Should I append CR to every line or is there anything in configuration I should set up for CR to be added automatically?

      Looks like this:

      abc
         def
            ghi
               etc 
      
      1 Reply Last reply
      0
      • A Offline
        A Offline
        andr
        wrote on 29 Apr 2016, 20:02 last edited by
        #3

        There is no option to globally change the end-of-line behaviour of qDebug.

        The missing interpretation of return of the carriage must be Netbeans doing. This does not happen in a normal terminal, nor in any other IDE I am aware of.

        1 Reply Last reply
        1
        • N Offline
          N Offline
          nulluse
          wrote on 3 May 2016, 18:55 last edited by
          #4

          Looks like this is Netbeans thing indeed, as it treats OS output regarding it not being able to start the program the same way.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved