Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. <solved> For Qt creator, gdb is not triggering
Forum Updated to NodeBB v4.3 + New Features

<solved> For Qt creator, gdb is not triggering

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 3.5k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    ajaijames
    wrote on 3 Nov 2014, 13:40 last edited by
    #1

    Hi Qt developer fellows.

    I am a Qt newbie, and struggling to get the debugger setup working for a creator project. I have a Qt creator project done in Windows mingw environment. The problem is that I am unable to debug it using the IDE.
    I have python 2.7 and 3.4 installed in my stem with environment variables set as
    PYTHONHOME=C:\Python27
    PYTHONPATH C:\Python27\Lib

    The build is working fine, but the debug status solid bar is turning red, and I can see a fail message in the Application output status window

    Debugging starts
    Debugging has failed
    Debugging has finished

    The error message from the log says that
    ImportError: No module named itertools
    UNEXPECTED GDB STDERR:

    The debugger log captured from Windows ->Views ->DebuggerLog is as below
    Any help is appreciated

    Thanks in advance,
    James

    starting debugger "GdbEngine" for ABI "x86-windows-msys-pe-32bit"...
    dStart parameters: 'embedded_Tools' mode: 1
    dABI: x86-windows-msys-pe-32bit
    dLanguages: any
    .
    .
    .

    sSetting up inferior...
    <10set substitute-path C:/work/build/qt5_workdir/w/s C:/Qt/Qt5.3.2/5.3/mingw482_32
    <11set substitute-path Q:/qt5_workdir/w/s C:/Qt/Qt5.3.2/5.3/mingw482_32
    <12-interpreter-exec console "set auto-solib-add on"
    <13-interpreter-exec console "python sys.path.insert(1, 'C:/Qt/Qt5.3.2/Tools/QtCreator/share/qtcreator/debugger/')"
    <14-interpreter-exec console "python sys.path.append('C:/Qt/Qt5.3.2/Tools/mingw482_32/bin/data-directory/python')"
    <15-interpreter-exec console "python from gdbbridge import *"

    dUNEXPECTED GDB STDERR: Traceback (most recent call last):
    d File "c:\qt\qt5.3.2\tools\mingw482_32\share\gdb/python/gdb/init.py", line 105, in auto_load_packages
    d import(modname)
    d File "c:\qt\qt5.3.2\tools\mingw482_32\share\gdb/python/gdb/command/frame_filters.py", line 22, in <module>
    d from gdb.FrameIterator import FrameIterator
    d File "c:\qt\qt5.3.2\tools\mingw482_32\share\gdb/python/gdb/FrameIterator.py", line 17, in <module>
    d import itertools
    dImportError: No module named itertools
    dUNEXPECTED GDB STDERR:
    .
    .
    .
    .3.2/Tools/QtCreator/share/qtcreator/debugger/gdbbridge.py", line 14, in <module>\n"

    &" import struct\n"
    &" File "C:\Python27\Lib/struct.py", line 1, in <module>\n"
    &" from struct import *\n"
    *
    >&"ImportError: No module named struct\n"*
    &"Error while executing Python code.\n"
    15^error,msg="Error while executing Python code."
    dNOTE: ENGINE SETUP FAILED
    dState changed from EngineSetupRequested(1) to EngineSetupFailed(2) [master]
    dHANDLE RUNCONTROL FINISHED
    sDebugger finished.
    dHANDLE RUNCONTROL START FAILED
    dState changed from EngineSetupFailed(2) to DebuggerFinished(23) [master]

    16^done

    dQUIT DEBUGGER REQUESTED IN STATE 23

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andrep
      wrote on 3 Nov 2014, 21:01 last edited by
      #2

      Your Python installation seems to be broken (either as-is, or by your explicit use of PYTHONPATH and PYTHONHOME environment variables - neither should be needed)

      "itertools" is not a Python module Qt Creator actively uses. It seems to be pulled in in your setup by GDB itself.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        ajaijames
        wrote on 4 Nov 2014, 09:43 last edited by
        #3

        Thank you very much andrep, for the kind help. You proved right. I deleted the environment variables, uninstalled python installations and qt installation. The I reinstalled qt environment. Now I am able to trigger gdb.

        Thanks a lot again

        1 Reply Last reply
        0

        1/3

        3 Nov 2014, 13:40

        • Login

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