Bitcoin Core uses the autotools build system, but CLion only supports projects using CMake, so you can’t use Core with CLion. You should be able to use Core with Eclipse CDT and NetBeans as those support Autotools. You may need to do some special configuring for it to work properly. Most people who work on Core just use text editors, command line build commands, and gdb instead of an actual IDE (at least that is what I use, and I have heard some others do too).
If you want to add debugging print statements to the code, just add lines like this:
fprintf(stderr, "some text heren");
and that will print
some text here to the terminal if you are running it from the terminal.
fprintf is a standard C function so you can look up how to use it to include more information in the output.