Qt Creator External Terminal Configuration
-
Hi guys... I had ask this question in the Qt mail list and had no answer... and that was my question...
Hi Guys
I'm new in my job and they work with KDevelop only because for debug our system, we need the option Use External Terminal with value xterm -hold -e %exeI have a lot of time working with Qt Creator, is my favorite C++ IDE and I'll like to use it, but I need this option for debugging the application...
KDevelop has this option in the Launch Configuration dialog
can I do de same with Qt Creator ??
I had set the Options > Environment > General > Terminal option with the value xterm -hold -e %exe, but when I run the program in debug mode, the console of xterm say
"Can't execvp %exe. No such file or directory"
and xterm give me the prompt, when I'm expecting that the program keep waiting my input passed by console.
How can I do that ??
best regard
-
@freddy311082 said:
And if you try with no %exe ? -
@mrjj said:
@freddy311082 said:
And if you try with no %exe ?if I try with no %exe xterm work, but debugger doesn't... and I need to debug my app...
I'm working with KDevelop project, so, I'm loading a CMakeList.txt file, not a .pro file
My point is, I need to use xterm -e -hold but at the same time, I need to use the debugger... with KDevelop I can use the debugger, and I need the same with Qt Creator
regards
-
I installed qt 5.5 in kubuntu.
I put
/usr/bin/xterm -hold -e in "Terminal"
and it display a xterm and stops at break points.
Only tested with some printf + fflush(stdout);Seems ok?
-
well... let me explain my environment..
in my enterprise they use KDevelop to develop our system... I'm loading a CMakeList.txt project, not a .pro file. In the second place, I'm running an external application... my application is a pp_paraguay_suscripcion.mod, which is a library, is not an executable file.
I had set the Executable and Working directory configurations manually, which are in the Project configuration in the Run tab from the Kit which I use...
after that, I had set the xterm -hold -e configuration in the Terminal configuration...
I'm using Debian Wizzy... run my application work fine, the problem is when I try to debug it... With KDevelop I can do it well, but with QtCreator I can't because, the program wait for my input, and after I set my input, program run and finish without stop in any breakpoint...
that is my issue... maybe I'm missing something, but I don't know what
regards
-
Im not sure it can work if not all are build in qt.
https://forum.qt.io/topic/26538/problem-debugging-shared-and-static-libs-in-qt-creator/2
I assume pp_paraguay_suscripcion.mod is a .so
and you have another program you set "run" as to use as loader / main program. ( is that also build in qtCreator ?)I have never tried a CMakeList project, but I assume it does set it for debug.
Have you tried something simple and seen that it can stop at break points ?
-
pp_paraguay_suscripcion.mod is an so and I have set run other program who load pp_paraguay_suscripcion.mod. Neither of then are build with QtCreator... they are build with KDevelop...
I have try only set breakpoint into the first function cal of my pp_paraguay_suscripcion.mod library, but QtCreator does not stop there...
that is my problem
-
I have not tried with a non qt loader program.
Maybe I can later.
And you are 100% sure the pp_mod SO are in debug mode ?SET(CMAKE_BUILD_TYPE Debug)
project(mybuildtype)in top of CMakeList.txt ?
-
Hmm , then i am out of suggestions.
The external application (the loader) is a kdevelop program, or completely external ?
Would it be possible to build that in QCreator too just to check?
-
the external application is an executable made it a time ago and I have not permission to its code.... QtCreator run the executable application, and in some point he stop running waiting for my input in console (in this case, xterm)... when I set the input, debugger does not stop... i can build my .mod file with qt creator, in fact, I made it many times, the problem is that the debugger does not stop...
tomorrow i will build again the app with qt creator and I'll tell you my frind
thanks for answer
regards
-
Hi mrjj
I had compiled my .mod file with Qt Creator and debugger doesn't stop in the breakpoint
I cant compile with Qt Creator the main application who run and load my library, I don't have access to it, and I think that we are found a bug, because KDevelop stop in the break point and Qt Creator doesn't.
And I know that Qt Creator is running my application because I can see the my output messages at xterm console, but DEBUGGER DOESN'T STOP IN THE BREAKPOINTS !! :(
regards my friend, and thank you very much
-
Hi freddy
If I read here
http://doc.qt.io/qtcreator/creator-debugger-operating-modes.html
and Launching in Start External Mode
it should be as easy
Debug > Start Debugging > Start and Debug External Application.
and select your "main application"So if that is not working, I guess you found a bug yes. As far as I understand
what you have/want.