This forum has been archived. All content is frozen. Please use KDE Discuss instead.

No console output in KDevelop (using Okular)

Tags: None
(comma "," separated)
User avatar
simgunz
Registered Member
Posts
56
Karma
0
OS
I am compiling and running Okular using KDevelop. In the "Run" window I cannot see any output generated by qDebug(). If I run the same code from the shell outside kdevelop, I am able to see the output. I think it is some configuration problem, can someone give me a hint?

The qDebug, was inserted by me, and that is the only one I can see from the shell. I cannot see the Okular categorized output in the shell.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Is the debug category enabled in the QT_LOGGING_RULES env var? Does it work if you just run it in a terminal?


I'm working on the KDevelop IDE.
User avatar
simgunz
Registered Member
Posts
56
Karma
0
OS
I extend my question, to ask more in general how to configure a dev environment for building okular with kdevelop.

Before using KDevelop I used a folder based approach as follow:
build - Directory where I build okular (inside okular source folder)
_root - Directory where I install Okular

I compile with:
Code: Select all
cmake -DCMAKE_INSTALL_PREFIX=/media/dataHD/development/kde/_root/ ..

and install with
Code: Select all
make install

Then I set the variables
Code: Select all
KF5=/_root
export QT_PLUGIN_PATH=$KF5/lib/plugins:$KF5/lib64/plugins:$KF5/lib/x86_64-linux-gnu/plugins:$QTDIR/plugins:$QT_PLUGIN_PATH


and run
Code: Select all
./okular

from the _root directory

I need to set the variable QT_PLUGIN_PATH because, okular uses okular part, and without the variable it would use the system okular part.

If I export QT_LOGGING_RULES=*.debug=true I can see the output from okular.

-------

In KDevelop I created a new project for Okular starting from the cmake file.
Then I created a new Run. I saw that Okular has some default Runs, so I used the shell/okular run.
When I execute this Run, okular uses the system okular part. How can I let it use the compiled okular part?

I created a variable in the default environment: QT_LOGGING_RULES=*.debug=true, but I cannot see any output.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Hm, that sounds like the subprocess environment is not set correctly. Are you using the AppImage? That has some specials regarding that.

What you can also try is starting "/usr/bin/env" as your target process, that will print the environment, and check if everything is set there as you would expect it to be.


I'm working on the KDevelop IDE.
User avatar
simgunz
Registered Member
Posts
56
Karma
0
OS
After further testing.

NOT setting the env variable QT_LOGGING_RULES="*.debug=true":

- If I click "Execute" there is no debug output.
- If I click "Debug" then I can see the debug output from qDebug() that I added to the code

Setting the env variable QT_LOGGING_RULES="*.debug=true":

- If I click "Execute" there is no debug output.
- If I click "Debug" then I can see the debug output from qDebug() that I added to the code and a lot of other debug output.

So basically there is no debug output when "Execute" is used. Is this intended?
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
No. That is also not the case here. Anything on command line? You do look for output in the ouput view, right?


I'm working on the KDevelop IDE.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]