Your tree does not agree with your narrative: there are no .pri files anywhere in your tree. IOW: You've answered your own question: your libraries should be .pro files and produce a static library, not .pri files :)
Static libraries are fully debuggable. You can compile Qt as a static library and debug into it, for example.
I have another problem: when I change something in the lib, the app doesn't automatically link it
You need to make the application dependent on the library. Add the library to the PRE_TARGETDEPS
in the application's .pro file. You also need to set up the proper dependency in the top-level subdirs project, to ensure that the libraries are always built prior to the projects that use them. Add, for example
apps/mainapp.depends += libs/lib1.