How to debug QtCreator plugins?
-
Hello, I have problem to understand debugging rules of QtCreator plugin in QtCreator.
I was successfully setup environment variables (QTC_SOURCE and QTC_BUILD) to build plugin. Then we must create run configuration and here I found some difficulties. There are my configuration properties below:- Exetuable: qtcreator // located in /usr/bin
- Arguments: // not set
- Working Directory: // not set
- Debugger: C++
- Run Enviroment: QT_PLUGIN_PATH=$BUILDDIR // $BUILDDIR = QTC_BUILD/lib/qtcreator/plugins
When I try to start debugging the warning message shown: "This does not seem to be a 'Debug' build...", although build settings has debug options.
Can you help me, somebody, what should I do to say qtcreator load my debugged plugin?
-
When developing Qt Creator (and its plugins) we usually build and run a complete instance of Qt Creator inside Qt Creator. That way you can start/stop the complete instance at any time, run the debugger on it, etc.
Qt Creator never unloads plugins, so testing a plugin inside the running Creator is a pain (even assuming there are no crashes:-).
-
"we usually build and run a complete instance of Qt Creator inside Qt Creator"
The statement makes no sense to me. I don't understand it. It's like saying "run an instance of IE inside IE." or "run an instance of excel inside excel."
-
Blessed Greek: Let's do this step by step then:
- Open Qt Creator (use the -color "#ff0000" parameter to tint the UI red, makes things easier later;)
- Grab the Qt Creator sources from gitorious.org
- Open qtcreator.pro
- Build
- Debug
Voila: Qt Creator run by/in a Qt Creator debugger. Is this clearer?
PS: We can kind of run "a browser" inside Qt Creator, too. Hit Ctrl-K, r search-term, use cursor keys to select the search engine you want;-)
-
I have done just what you have described in Windows with the latest from git. However when starting debug session I get 0xC0000022. Is there a way to solve this issue? Thanks.
-
if you landed here just check my new topic with some ideas for a solution.
Topic: Solution for Debug QtCreator Plugins with QtCreator from source