I want to use PyQGIS from PyCharm to debug and test.
For this I need that my script use my qgis3.ini file to get credential. This one is in C:\Users\guigu\AppData\Roaming\QGIS\QGIS3\profiles\default\QGIS but when I launch my script from pycharm, it use another one in C:\Users\guigu\AppData\Roaming\python3\profiles\default\Unknown Organization\python3.ini.
My script is very simple :
from qgis.core import QgsApplication
app = QgsApplication([], False)
app.initQgis()
print(app.qgisSettingsDirPath())
#C:/Users/guigu/AppData/Roaming/python3\profiles\default/
I try this but I have the same result :
app = QgsApplication([], False, r"C:\Users\guigu\AppData\Roaming\QGIS\QGIS3\profiles\default\")
How to configure my script to have access to my ini file and credentials?