Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
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...
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 %exe
I 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 ??
And if you try with no %exe ?
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
I installed qt 5.5 in kubuntu.
/usr/bin/xterm -hold -e in "Terminal"
and it display a xterm and stops at break points.
Only tested with some printf + fflush(stdout);
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
Im not sure it can work if not all are build in qt.
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 ?
in top of CMakeList.txt ?
@mrjj yes because the same application I'm debugging it with KDevelop, is exactly the same :(
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
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
If I read here
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.
well my friend, then we found a bug, because it doesn't work :(