<solved> For Qt creator, gdb is not triggering
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
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 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,
starting debugger "GdbEngine" for ABI "x86-windows-msys-pe-32bit"...
dStart parameters: 'embedded_Tools' mode: 1
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 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
dHANDLE RUNCONTROL START FAILED
dState changed from EngineSetupFailed(2) to DebuggerFinished(23) [master]
dQUIT DEBUGGER REQUESTED IN STATE 23
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.
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