[{"data":1,"prerenderedAt":1623},["ShallowReactive",2],{"doc:\u002Fpyqgis-fundamentals-environment-setup\u002Fsetting-up-pycharm-for-qgis":3},{"id":4,"title":5,"body":6,"description":1611,"extension":1612,"meta":1613,"navigation":520,"path":1619,"seo":1620,"stem":1621,"__hash__":1622},"docs\u002Fpyqgis-fundamentals-environment-setup\u002Fsetting-up-pycharm-for-qgis\u002Findex.md","Setting Up PyCharm for QGIS Development",{"type":7,"value":8,"toc":1595},"minimark",[9,14,29,41,49,208,213,216,251,255,258,304,316,320,378,390,394,405,409,418,423,429,437,444,450,456,463,467,474,732,735,740,743,779,787,791,801,820,917,928,1029,1048,1052,1162,1180,1184,1198,1213,1217,1223,1326,1335,1342,1346,1406,1409,1413,1426,1455,1461,1471,1485,1494,1503,1512,1518,1524,1530,1534,1591],[10,11,13],"h1",{"id":12},"setting-up-pycharm-for-qgis-a-complete-workflow","Setting Up PyCharm for QGIS: A Complete Workflow",[15,16,17,18,23,24,28],"p",{},"Transitioning from the interactive ",[19,20,22],"a",{"href":21},"\u002Fpyqgis-fundamentals-environment-setup\u002Fqgis-python-console-basics\u002F","QGIS Python Console"," to a full-featured integrated development environment significantly accelerates PyQGIS development. While the built-in console excels at quick spatial queries and rapid prototyping, production workflows demand robust debugging, version control integration, and intelligent code completion. This guide details the exact process for setting up PyCharm for QGIS, ensuring your local IDE mirrors the QGIS runtime. By following this structured approach, you will establish a reliable bridge between JetBrains' tooling and the QGIS Python ecosystem, forming a critical component of your broader ",[19,25,27],{"href":26},"\u002Fpyqgis-fundamentals-environment-setup\u002F","PyQGIS environment setup",".",[15,30,31,32,35,36,40],{},"This is a hands-on companion to the ",[19,33,34],{"href":26},"PyQGIS Fundamentals & Environment Setup"," hub. If you are still weighing editors before committing to one, the ",[19,37,39],{"href":38},"\u002Fpyqgis-fundamentals-environment-setup\u002Fsetting-up-pycharm-for-qgis\u002Fbest-ide-for-qgis-plugin-development\u002F","comparison of IDEs for QGIS plugin work"," covers where PyCharm, VS Code, and Spyder differ; this page assumes you have chosen PyCharm and want it wired to QGIS correctly the first time.",[15,42,43,44,48],{},"The diagram below shows how the pieces wire together: PyCharm's project interpreter points at the QGIS bundled Python, the run configuration supplies the environment variables that let ",[45,46,47],"code",{},"qgis.*"," resolve, and an optional debug bridge attaches to the live QGIS process.",[50,51,56,60,64,71,81,90,96,100,104,110,115,119,124,129,132,135,142,148,152,160,165,169,185,192,196,200,203],"svg",{"viewBox":52,"role":53,"ariaLabel":54,"xmlns":55},"0 0 760 360","img","PyCharm interpreter pointing at the QGIS bundled Python, environment variables enabling qgis module imports, with an optional remote-debug bridge to the running QGIS","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg",[57,58,59],"title",{},"How PyCharm is wired to QGIS",[61,62,63],"desc",{},"PyCharm's interpreter targets the QGIS bundled Python; PYTHONPATH and QGIS_PREFIX_PATH let qgis modules import; an optional pydevd bridge connects to a running QGIS instance.",[65,66],"rect",{"x":67,"y":67,"width":68,"height":69,"fill":70},"0","760","360","#f6f3ea",[65,72],{"x":73,"y":74,"width":75,"height":76,"rx":77,"fill":78,"stroke":79,"style":80},"24","40","200","96","10","#fffdf7","#2563eb","stroke-width:2.5",[82,83,89],"text",{"x":84,"y":85,"style":86,"fill":87,"textAnchor":88},"124","74","text-anchor:middle;font-size:15px;font-weight:bold;font-family:sans-serif","#17211d","middle","PyCharm",[82,91,95],{"x":84,"y":92,"style":93,"fill":94,"textAnchor":88},"98","text-anchor:middle;font-size:12px;font-family:sans-serif","#2f3b35","Project interpreter",[82,97,99],{"x":84,"y":98,"style":93,"fill":94,"textAnchor":88},"116","+ run configuration",[65,101],{"x":102,"y":74,"width":75,"height":76,"rx":77,"fill":78,"stroke":103,"style":80},"300","#0f766e",[82,105,109],{"x":106,"y":107,"style":108,"fill":87,"textAnchor":88},"400","68","text-anchor:middle;font-size:14px;font-weight:bold;font-family:sans-serif","QGIS bundled Python",[82,111,114],{"x":106,"y":112,"style":113,"fill":94,"textAnchor":88},"92","text-anchor:middle;font-size:12px;font-family:monospace","Python 3.12",[82,116,118],{"x":106,"y":117,"style":93,"fill":94,"textAnchor":88},"110","GDAL \u002F PROJ \u002F Qt5",[65,120],{"x":121,"y":74,"width":122,"height":76,"rx":77,"fill":78,"stroke":123,"style":80},"540","196","#15803d",[82,125,128],{"x":126,"y":85,"style":127,"fill":87,"textAnchor":88},"638","text-anchor:middle;font-size:14px;font-weight:bold;font-family:monospace","qgis.* modules",[82,130,131],{"x":126,"y":92,"style":93,"fill":94,"textAnchor":88},"qgis.core, qgis.gui,",[82,133,134],{"x":126,"y":98,"style":93,"fill":94,"textAnchor":88},"qgis.analysis",[65,136],{"x":137,"y":138,"width":139,"height":140,"rx":77,"fill":141},"240","180","320","64","#26322d",[82,143,147],{"x":106,"y":144,"style":145,"fill":146,"textAnchor":88},"206","text-anchor:middle;font-size:13px;font-weight:bold;font-family:monospace","#d9f99d","PYTHONPATH + QGIS_PREFIX_PATH",[82,149,151],{"x":106,"y":150,"style":113,"fill":146,"textAnchor":88},"228","set in Edit Configurations → Environment",[65,153],{"x":154,"y":155,"width":156,"height":157,"rx":77,"fill":78,"stroke":158,"style":159},"232","288","336","56","#b45309","stroke-width:2.5;stroke-dasharray:6 4",[82,161,164],{"x":106,"y":162,"style":163,"fill":87,"textAnchor":88},"312","text-anchor:middle;font-size:13px;font-weight:bold;font-family:sans-serif","Optional: remote-debug bridge",[82,166,168],{"x":106,"y":167,"style":113,"fill":94,"textAnchor":88},"330","pydevd_pycharm.settrace → running QGIS",[170,171,172],"defs",{},[173,174,181],"marker",{"id":175,"viewBox":176,"refX":177,"refY":178,"markerWidth":179,"markerHeight":179,"orient":180},"arp","0 0 10 10","9","5","7","auto",[182,183],"path",{"d":184,"fill":94},"M0,0 L10,5 L0,10 z",[186,187],"line",{"x1":188,"y1":189,"x2":190,"y2":189,"stroke":94,"style":191},"224","88","296","stroke-width:2.5;marker-end:url(#arp)",[186,193],{"x1":194,"y1":189,"x2":195,"y2":189,"stroke":94,"style":191},"500","536",[182,197],{"d":198,"stroke":94,"fill":199,"style":191},"M400 180 L400 140","none",[182,201],{"d":202,"stroke":94,"fill":199,"style":191},"M124 136 C124 200, 180 212, 236 212",[186,204],{"x1":106,"y1":205,"x2":106,"y2":206,"stroke":158,"style":207},"244","284","stroke-width:2.5;stroke-dasharray:6 4;marker-end:url(#arp)",[209,210,212],"h2",{"id":211},"prerequisites","Prerequisites",[15,214,215],{},"Before configuring the IDE, verify the following components are installed and accessible:",[217,218,219,227,233,239,245],"ul",{},[220,221,222,226],"li",{},[223,224,225],"strong",{},"QGIS 3.x"," (LTR or Latest Release) installed via OSGeo4W, standalone installer, or native package manager.",[220,228,229,232],{},[223,230,231],{},"JetBrains PyCharm"," (Professional or Community Edition) updated to a recent stable release.",[220,234,235,238],{},[223,236,237],{},"Basic familiarity"," with Python syntax, virtual environments, and terminal navigation.",[220,240,241,244],{},[223,242,243],{},"Administrative privileges"," (if modifying system environment variables is required on your OS).",[220,246,247,250],{},[223,248,249],{},"A dedicated workspace"," directory for your PyQGIS scripts or plugin repositories.",[209,252,254],{"id":253},"locate-the-qgis-python-interpreter","Locate the QGIS Python interpreter",[15,256,257],{},"QGIS ships with an isolated Python environment to prevent conflicts with system-wide installations and guarantee binary compatibility with GDAL, PROJ, and Qt. You must identify the exact executable path before proceeding.",[217,259,260,274,282,290],{},[220,261,262,265,266,269,270,273],{},[223,263,264],{},"Windows (OSGeo4W):"," ",[45,267,268],{},"C:\\OSGeo4W\\apps\\Python312\\python.exe"," (QGIS 3.34+, including 3.44 LTR) or ",[45,271,272],{},"C:\\OSGeo4W\\apps\\Python39\\python.exe"," (older QGIS 3.28)",[220,275,276,265,279],{},[223,277,278],{},"Windows (Standalone):",[45,280,281],{},"C:\\Program Files\\QGIS 3.x\\apps\\Python3x\\python.exe",[220,283,284,265,287],{},[223,285,286],{},"macOS:",[45,288,289],{},"\u002FApplications\u002FQGIS.app\u002FContents\u002FMacOS\u002Fbin\u002Fpython3",[220,291,292,295,296,299,300,303],{},[223,293,294],{},"Linux:"," Typically ",[45,297,298],{},"\u002Fusr\u002Fbin\u002Fpython3",", but verify by running ",[45,301,302],{},"python3 -c \"import qgis.core; print(qgis.core.__file__)\""," to confirm the QGIS bindings resolve.",[15,305,306,307,310,311,315],{},"Open a terminal and run the executable directly (e.g., ",[45,308,309],{},"python3 -c \"import qgis.core\"",") to confirm it launches without import errors, then copy the absolute path for the next step. The bundled interpreter version tracks the QGIS release, so pinning your project to an LTR matters — QGIS 3.x builds against PyQt5 while QGIS 4.0 moves to PyQt6. Before you commit example code to a repository, check the ",[19,312,314],{"href":313},"\u002Fpyqgis-fundamentals-environment-setup\u002Fqgis-api-architecture\u002Fqgis-python-version-compatibility-guide\u002F","QGIS Python version compatibility guide"," so your interpreter, bindings, and imports all line up.",[209,317,319],{"id":318},"point-pycharm-at-the-bundled-interpreter","Point PyCharm at the bundled interpreter",[321,322,323,326,340,346,356,359],"ol",{},[220,324,325],{},"Launch PyCharm, create a new project, or open an existing one.",[220,327,328,329,332,333,336,337,28],{},"Navigate to ",[45,330,331],{},"File > Settings"," (",[45,334,335],{},"PyCharm > Preferences"," on macOS) → ",[45,338,339],{},"Project: \u003CName> > Python Interpreter",[220,341,342,343,28],{},"Click the gear icon next to the interpreter dropdown → ",[45,344,345],{},"Add...",[220,347,348,349,352,353,28],{},"Select ",[45,350,351],{},"System Interpreter"," or ",[45,354,355],{},"Existing Environment",[220,357,358],{},"Paste the QGIS Python executable path from Step 1.",[220,360,361,362,365,366,369,370,373,374,377],{},"Click ",[45,363,364],{},"OK"," and allow PyCharm to index the environment. This may take several minutes as it parses ",[45,367,368],{},"qgis",", ",[45,371,372],{},"PyQt5",", and ",[45,375,376],{},"gdal"," bindings.",[15,379,380,381,369,384,373,387,389],{},"Once indexing completes, verify that ",[45,382,383],{},"qgis.core",[45,385,386],{},"qgis.gui",[45,388,134],{}," appear in the interpreter package list.",[209,391,393],{"id":392},"inject-the-required-environment-variables","Inject the required environment variables",[15,395,396,397,400,401,404],{},"PyQGIS relies on environment variables to locate native libraries, provider plugins, and spatial reference databases. Without these, imports will fail at runtime. In PyCharm, navigate to ",[45,398,399],{},"Run > Edit Configurations",", select your script, and expand the ",[45,402,403],{},"Environment variables"," section. Add the following key-value pairs, adjusting paths to match your installation:",[15,406,407],{},[223,408,264],{},[410,411,416],"pre",{"className":412,"code":414,"language":82,"meta":415},[413],"language-text","PYTHONPATH=C:\\OSGeo4W\\apps\\qgis-ltr\\python;C:\\OSGeo4W\\apps\\qgis-ltr\\python\\plugins\nPATH=C:\\OSGeo4W\\bin;C:\\OSGeo4W\\apps\\qgis-ltr\\bin;%PATH%\nQGIS_PREFIX_PATH=C:\\OSGeo4W\\apps\\qgis-ltr\n","",[45,417,414],{"__ignoreMap":415},[15,419,420],{},[223,421,422],{},"macOS\u002FLinux:",[410,424,427],{"className":425,"code":426,"language":82,"meta":415},[413],"PYTHONPATH=\u002FApplications\u002FQGIS.app\u002FContents\u002FResources\u002Fpython:\u002FApplications\u002FQGIS.app\u002FContents\u002FResources\u002Fpython\u002Fplugins\nPATH=\u002FApplications\u002FQGIS.app\u002FContents\u002FMacOS:\u002FApplications\u002FQGIS.app\u002FContents\u002FFrameworks:$PATH\nQGIS_PREFIX_PATH=\u002FApplications\u002FQGIS.app\u002FContents\u002FMacOS\n",[45,428,426],{"__ignoreMap":415},[15,430,431,432,436],{},"If you manage third-party packages outside the bundled QGIS environment, consider isolating them with a dedicated ",[19,433,435],{"href":434},"\u002Fpyqgis-fundamentals-environment-setup\u002Fvirtual-environments-for-gis\u002F","virtual environment for GIS work"," to maintain clean dependency trees. However, PyQGIS core modules must always resolve to the QGIS-provided Python environment to avoid ABI incompatibilities.",[15,438,439,440,443],{},"To execute PyQGIS scripts that instantiate ",[45,441,442],{},"QgsApplication",", you must also ensure the Qt platform plugin is discoverable. On Windows, add this variable to your PyCharm run configuration:",[410,445,448],{"className":446,"code":447,"language":82,"meta":415},[413],"QT_QPA_PLATFORM_PLUGIN_PATH=C:\\OSGeo4W\\apps\\Qt5\\plugins\\platforms\n",[45,449,447],{"__ignoreMap":415},[15,451,452],{},[453,454,455],"em",{},"(macOS\u002FLinux users typically do not need this variable as the Qt platform plugin path is set by the QGIS environment.)",[15,457,458,459,462],{},"For plugin development, configure a custom run configuration that targets your plugin's ",[45,460,461],{},"__init__.py"," or uses QGIS's built-in plugin reloader, synchronising your plugin directory with the active QGIS profile folder so breakpoints map to the GUI thread.",[209,464,466],{"id":465},"validate-the-setup-with-a-headless-script","Validate the setup with a headless script",[15,468,469,470,473],{},"Create ",[45,471,472],{},"test_setup.py"," in your project root and run it using the configured environment:",[410,475,479],{"className":476,"code":477,"language":478,"meta":415,"style":415},"language-python shiki shiki-themes github-dark","import sys\nimport os\nfrom qgis.core import QgsApplication, QgsVectorLayer\n\n# Initialize QGIS application (headless mode; False = no GUI)\nqgs = QgsApplication([], False)\nqgs.setPrefixPath(os.environ.get(\"QGIS_PREFIX_PATH\", \"\u002Fusr\"), True)\nqgs.initQgis()\n\nprint(f\"QGIS Version: {QgsApplication.QGIS_VERSION}\")\nprint(f\"Python Version: {sys.version}\")\n\n# Test in-memory layer creation\nlayer = QgsVectorLayer(\"Point?crs=EPSG:4326\", \"Test Points\", \"memory\")\nif layer.isValid():\n    print(\"Memory layer created successfully.\")\nelse:\n    print(\"Failed to create memory layer.\")\n\n# Clean exit\nqgs.exitQgis()\n","python",[45,480,481,493,501,515,522,529,548,571,577,582,611,635,640,646,672,681,694,703,715,720,726],{"__ignoreMap":415},[482,483,485,489],"span",{"class":186,"line":484},1,[482,486,488],{"class":487},"snl16","import",[482,490,492],{"class":491},"s95oV"," sys\n",[482,494,496,498],{"class":186,"line":495},2,[482,497,488],{"class":487},[482,499,500],{"class":491}," os\n",[482,502,504,507,510,512],{"class":186,"line":503},3,[482,505,506],{"class":487},"from",[482,508,509],{"class":491}," qgis.core ",[482,511,488],{"class":487},[482,513,514],{"class":491}," QgsApplication, QgsVectorLayer\n",[482,516,518],{"class":186,"line":517},4,[482,519,521],{"emptyLinePlaceholder":520},true,"\n",[482,523,525],{"class":186,"line":524},5,[482,526,528],{"class":527},"sjoCn","# Initialize QGIS application (headless mode; False = no GUI)\n",[482,530,532,535,538,541,545],{"class":186,"line":531},6,[482,533,534],{"class":491},"qgs ",[482,536,537],{"class":487},"=",[482,539,540],{"class":491}," QgsApplication([], ",[482,542,544],{"class":543},"sDLfK","False",[482,546,547],{"class":491},")\n",[482,549,551,554,558,560,563,566,569],{"class":186,"line":550},7,[482,552,553],{"class":491},"qgs.setPrefixPath(os.environ.get(",[482,555,557],{"class":556},"sU2Wk","\"QGIS_PREFIX_PATH\"",[482,559,369],{"class":491},[482,561,562],{"class":556},"\"\u002Fusr\"",[482,564,565],{"class":491},"), ",[482,567,568],{"class":543},"True",[482,570,547],{"class":491},[482,572,574],{"class":186,"line":573},8,[482,575,576],{"class":491},"qgs.initQgis()\n",[482,578,580],{"class":186,"line":579},9,[482,581,521],{"emptyLinePlaceholder":520},[482,583,585,588,591,594,597,600,603,606,609],{"class":186,"line":584},10,[482,586,587],{"class":543},"print",[482,589,590],{"class":491},"(",[482,592,593],{"class":487},"f",[482,595,596],{"class":556},"\"QGIS Version: ",[482,598,599],{"class":543},"{",[482,601,602],{"class":491},"QgsApplication.",[482,604,605],{"class":543},"QGIS_VERSION}",[482,607,608],{"class":556},"\"",[482,610,547],{"class":491},[482,612,614,616,618,620,623,625,628,631,633],{"class":186,"line":613},11,[482,615,587],{"class":543},[482,617,590],{"class":491},[482,619,593],{"class":487},[482,621,622],{"class":556},"\"Python Version: ",[482,624,599],{"class":543},[482,626,627],{"class":491},"sys.version",[482,629,630],{"class":543},"}",[482,632,608],{"class":556},[482,634,547],{"class":491},[482,636,638],{"class":186,"line":637},12,[482,639,521],{"emptyLinePlaceholder":520},[482,641,643],{"class":186,"line":642},13,[482,644,645],{"class":527},"# Test in-memory layer creation\n",[482,647,649,652,654,657,660,662,665,667,670],{"class":186,"line":648},14,[482,650,651],{"class":491},"layer ",[482,653,537],{"class":487},[482,655,656],{"class":491}," QgsVectorLayer(",[482,658,659],{"class":556},"\"Point?crs=EPSG:4326\"",[482,661,369],{"class":491},[482,663,664],{"class":556},"\"Test Points\"",[482,666,369],{"class":491},[482,668,669],{"class":556},"\"memory\"",[482,671,547],{"class":491},[482,673,675,678],{"class":186,"line":674},15,[482,676,677],{"class":487},"if",[482,679,680],{"class":491}," layer.isValid():\n",[482,682,684,687,689,692],{"class":186,"line":683},16,[482,685,686],{"class":543},"    print",[482,688,590],{"class":491},[482,690,691],{"class":556},"\"Memory layer created successfully.\"",[482,693,547],{"class":491},[482,695,697,700],{"class":186,"line":696},17,[482,698,699],{"class":487},"else",[482,701,702],{"class":491},":\n",[482,704,706,708,710,713],{"class":186,"line":705},18,[482,707,686],{"class":543},[482,709,590],{"class":491},[482,711,712],{"class":556},"\"Failed to create memory layer.\"",[482,714,547],{"class":491},[482,716,718],{"class":186,"line":717},19,[482,719,521],{"emptyLinePlaceholder":520},[482,721,723],{"class":186,"line":722},20,[482,724,725],{"class":527},"# Clean exit\n",[482,727,729],{"class":186,"line":728},21,[482,730,731],{"class":491},"qgs.exitQgis()\n",[15,733,734],{},"A successful run confirms that PyCharm correctly resolves QGIS modules, initializes the application context, and links to the geometry engine.",[736,737,739],"h3",{"id":738},"reading-the-verification-script","Reading the verification script",[15,741,742],{},"The verification script demonstrates three critical PyQGIS initialization patterns:",[321,744,745,759,771],{},[220,746,747,752,753,755,756,758],{},[223,748,749],{},[45,750,751],{},"QgsApplication([], False)",": Instantiates the QGIS core without launching the GUI. The ",[45,754,544],{}," flag enables headless execution, ideal for background processing or testing. Set to ",[45,757,568],{}," only when building interactive canvas tools.",[220,760,761,766,767,770],{},[223,762,763],{},[45,764,765],{},"qgs.initQgis()",": Loads data providers, plugins, and CRS databases. Skipping this step causes ",[45,768,769],{},"QgsVectorLayer"," and other spatial classes to fail silently because underlying GDAL\u002FOGR and projection backends remain uninitialized.",[220,772,773,778],{},[223,774,775],{},[45,776,777],{},"QgsVectorLayer(\"Point?crs=EPSG:4326\", \"Test Points\", \"memory\")",": Creates an in-memory vector layer. This syntax bypasses file I\u002FO and validates that the geometry engine and coordinate transformation libraries are correctly linked.",[15,780,781,782,786],{},"When transitioning from standalone scripts to full-featured tools, you will frequently interact with the ",[19,783,785],{"href":784},"\u002Fpyqgis-fundamentals-environment-setup\u002Fqgis-api-architecture\u002F","QGIS API architecture"," to manage map canvases, layout engines, and processing algorithms. Proper environment configuration ensures these high-level abstractions resolve without import errors.",[209,788,790],{"id":789},"attach-the-debugger-to-a-live-qgis-session","Attach the debugger to a live QGIS session",[15,792,793,794,797,798,28],{},"The headless script above runs entirely inside PyCharm, but the highest-value use of the IDE is stepping through code that executes ",[453,795,796],{},"inside the running QGIS application"," — a plugin action, a canvas tool, or a Processing algorithm reacting to real user input. This is the optional \"remote-debug bridge\" shown in the diagram, and PyCharm Professional wires it up with ",[45,799,800],{},"pydevd",[15,802,803,804,807,808,811,812,815,816,819],{},"First, create a ",[223,805,806],{},"Python Debug Server"," run configuration in PyCharm (",[45,809,810],{},"Run > Edit Configurations > + > Python Debug Server","), noting the host (",[45,813,814],{},"localhost",") and port (default ",[45,817,818],{},"5678","). Start it — PyCharm now listens for an inbound connection. Then, from the QGIS Python Console or from anywhere inside your plugin, install and trigger the bridge:",[410,821,823],{"className":476,"code":822,"language":478,"meta":415,"style":415},"# Install once into the QGIS-bundled interpreter:\n#   pip install pydevd-pycharm~=\u003Cyour PyCharm build number>\nimport pydevd_pycharm\n\n# Connect the running QGIS process back to the waiting IDE\npydevd_pycharm.settrace(\n    \"localhost\",\n    port=5678,\n    stdoutToServer=True,\n    stderrToServer=True,\n    suspend=False,   # keep QGIS responsive; breakpoints still fire\n)\n",[45,824,825,830,835,842,846,851,856,864,876,887,898,913],{"__ignoreMap":415},[482,826,827],{"class":186,"line":484},[482,828,829],{"class":527},"# Install once into the QGIS-bundled interpreter:\n",[482,831,832],{"class":186,"line":495},[482,833,834],{"class":527},"#   pip install pydevd-pycharm~=\u003Cyour PyCharm build number>\n",[482,836,837,839],{"class":186,"line":503},[482,838,488],{"class":487},[482,840,841],{"class":491}," pydevd_pycharm\n",[482,843,844],{"class":186,"line":517},[482,845,521],{"emptyLinePlaceholder":520},[482,847,848],{"class":186,"line":524},[482,849,850],{"class":527},"# Connect the running QGIS process back to the waiting IDE\n",[482,852,853],{"class":186,"line":531},[482,854,855],{"class":491},"pydevd_pycharm.settrace(\n",[482,857,858,861],{"class":186,"line":550},[482,859,860],{"class":556},"    \"localhost\"",[482,862,863],{"class":491},",\n",[482,865,866,870,872,874],{"class":186,"line":573},[482,867,869],{"class":868},"s9osk","    port",[482,871,537],{"class":487},[482,873,818],{"class":543},[482,875,863],{"class":491},[482,877,878,881,883,885],{"class":186,"line":579},[482,879,880],{"class":868},"    stdoutToServer",[482,882,537],{"class":487},[482,884,568],{"class":543},[482,886,863],{"class":491},[482,888,889,892,894,896],{"class":186,"line":584},[482,890,891],{"class":868},"    stderrToServer",[482,893,537],{"class":487},[482,895,568],{"class":543},[482,897,863],{"class":491},[482,899,900,903,905,907,910],{"class":186,"line":613},[482,901,902],{"class":868},"    suspend",[482,904,537],{"class":487},[482,906,544],{"class":543},[482,908,909],{"class":491},",   ",[482,911,912],{"class":527},"# keep QGIS responsive; breakpoints still fire\n",[482,914,915],{"class":186,"line":637},[482,916,547],{"class":491},[15,918,919,920,923,924,927],{},"The connection direction is the part that trips people up: the IDE is the ",[453,921,922],{},"server"," that waits, and the running QGIS process is the ",[453,925,926],{},"client"," that reaches back out to it. The sequence below traces that handshake from the first listen to a live breakpoint.",[50,929,932,935,938,940,943,947,951,954,958,961,966,968,980,985,990,994,1000,1004,1008,1012,1017,1020,1023,1027],{"viewBox":930,"role":53,"ariaLabel":931,"xmlns":55},"0 0 760 400","Sequence diagram of the pydevd debug handshake: PyCharm starts a debug server and listens on port 5678, the running QGIS process calls settrace to connect back, the debugger attaches, a breakpoint suspends the QGIS GUI thread, variable frames stream to the IDE, and step or resume commands flow back to QGIS",[57,933,934],{},"The pydevd remote-debug handshake between PyCharm and QGIS",[61,936,937],{},"PyCharm runs a Python Debug Server that listens on localhost:5678. The live QGIS process calls pydevd_pycharm.settrace and connects back to that port. Once attached, a breakpoint suspends the QGIS GUI thread, feature and geometry frames stream to the IDE, and step or resume commands are sent back to QGIS.",[65,939],{"x":67,"y":67,"width":68,"height":106,"fill":70},[65,941],{"x":74,"y":73,"width":137,"height":942,"rx":77,"fill":78,"stroke":79,"style":80},"52",[82,944,89],{"x":945,"y":946,"style":108,"fill":87,"textAnchor":88},"160","47",[82,948,950],{"x":945,"y":949,"style":93,"fill":94,"textAnchor":88},"65","Python Debug Server (IDE)",[65,952],{"x":953,"y":73,"width":137,"height":942,"rx":77,"fill":78,"stroke":123,"style":80},"480",[82,955,957],{"x":956,"y":946,"style":108,"fill":87,"textAnchor":88},"600","QGIS",[82,959,960],{"x":956,"y":949,"style":93,"fill":94,"textAnchor":88},"running process + GUI thread",[186,962],{"x1":945,"y1":963,"x2":945,"y2":964,"stroke":79,"style":965},"76","376","stroke-width:1.5;stroke-dasharray:4 5",[186,967],{"x1":956,"y1":963,"x2":956,"y2":964,"stroke":123,"style":965},[170,969,970,975],{},[173,971,973],{"id":972,"viewBox":176,"refX":177,"refY":178,"markerWidth":179,"markerHeight":179,"orient":180},"dbgR",[182,974],{"d":184,"fill":94},[173,976,978],{"id":977,"viewBox":176,"refX":177,"refY":178,"markerWidth":179,"markerHeight":179,"orient":180},"dbgL",[182,979],{"d":184,"fill":94},[65,981],{"x":982,"y":92,"width":75,"height":983,"rx":984,"fill":141},"60","34","8",[82,986,989],{"x":945,"y":987,"style":988,"fill":146,"textAnchor":88},"119","text-anchor:middle;font-size:12px;font-weight:bold;font-family:monospace","listen on :5678",[82,991,993],{"x":992,"y":945,"style":113,"fill":94,"textAnchor":88},"380","settrace(\"localhost\", 5678) → connect back",[186,995],{"x1":996,"y1":997,"x2":998,"y2":997,"stroke":94,"style":999},"596","170","164","stroke-width:2.5;marker-end:url(#dbgL)",[82,1001,1003],{"x":992,"y":1002,"style":93,"fill":94,"textAnchor":88},"204","handshake OK — debugger attached",[186,1005],{"x1":998,"y1":1006,"x2":996,"y2":1006,"stroke":94,"style":1007},"214","stroke-width:2.5;marker-end:url(#dbgR)",[65,1009],{"x":194,"y":1010,"width":75,"height":983,"rx":984,"fill":78,"stroke":158,"style":1011},"238","stroke-width:2",[82,1013,1016],{"x":956,"y":1014,"style":1015,"fill":87,"textAnchor":88},"259","text-anchor:middle;font-size:12px;font-weight:bold;font-family:sans-serif","breakpoint suspends GUI thread",[82,1018,1019],{"x":992,"y":102,"style":93,"fill":94,"textAnchor":88},"QgsFeature \u002F geometry frames stream to IDE",[186,1021],{"x1":996,"y1":1022,"x2":998,"y2":1022,"stroke":94,"style":999},"310",[82,1024,1026],{"x":992,"y":1025,"style":93,"fill":94,"textAnchor":88},"350","step \u002F resume command",[186,1028],{"x1":998,"y1":69,"x2":996,"y2":69,"stroke":94,"style":1007},[15,1030,1031,1032,1035,1036,1039,1040,1043,1044,28],{},"Once ",[45,1033,1034],{},"settrace"," runs, breakpoints set in PyCharm halt execution against the actual QGIS GUI thread, and you can inspect ",[45,1037,1038],{},"QgsFeature"," attributes, geometry objects, and signal payloads in real time. Keep the debug egg version aligned with your PyCharm build, or the handshake fails silently. For the wider set of tactics — logging strategies, ",[45,1041,1042],{},"QgsMessageLog"," output, and post-mortem inspection — see the dedicated guide on ",[19,1045,1047],{"href":1046},"\u002Fpyqgis-fundamentals-environment-setup\u002Fdebugging-pyqgis-scripts\u002F","debugging PyQGIS scripts",[209,1049,1051],{"id":1050},"troubleshooting-common-errors","Troubleshooting common errors",[1053,1054,1055,1071],"table",{},[1056,1057,1058],"thead",{},[1059,1060,1061,1065,1068],"tr",{},[1062,1063,1064],"th",{},"Error",[1062,1066,1067],{},"Cause",[1062,1069,1070],{},"Fix",[1072,1073,1074,1104,1117,1141],"tbody",{},[1059,1075,1076,1083,1094],{},[1077,1078,1079,1082],"td",{},[45,1080,1081],{},"ImportError: DLL load failed"," (Windows)",[1077,1084,1085,1086,1089,1090,1093],{},"System ",[45,1087,1088],{},"PATH"," excludes QGIS binaries, blocking ",[45,1091,1092],{},"qgis_core.dll"," and Qt dependencies.",[1077,1095,1096,1097,1100,1101,1103],{},"Add the QGIS ",[45,1098,1099],{},"bin"," directory to the ",[45,1102,1088],{}," variable in PyCharm's Run Configuration. Restart PyCharm to apply changes.",[1059,1105,1106,1111,1114],{},[1077,1107,1108],{},[45,1109,1110],{},"ModuleNotFoundError: No module named 'qgis'",[1077,1112,1113],{},"PyCharm is using a system Python or virtualenv without QGIS bindings.",[1077,1115,1116],{},"Revert to the exact Python executable shipped with QGIS (Step 2). Do not symlink QGIS packages into external environments.",[1059,1118,1119,1124,1127],{},[1077,1120,1121],{},[45,1122,1123],{},"QGIS_PREFIX_PATH is not set",[1077,1125,1126],{},"QGIS cannot locate its core data files, CRS database, or provider plugins.",[1077,1128,1129,1130,1133,1134,1137,1138,28],{},"Explicitly define ",[45,1131,1132],{},"QGIS_PREFIX_PATH"," in your run configuration. Verify it points to the directory containing ",[45,1135,1136],{},"share\u002Fqgis"," and ",[45,1139,1140],{},"lib\u002Fqgis",[1059,1142,1143,1149,1152],{},[1077,1144,1145,1146],{},"Segmentation Fault on ",[45,1147,1148],{},"initQgis()",[1077,1150,1151],{},"Conflicting Qt\u002FPyQt libraries between system Python and QGIS.",[1077,1153,1154,1155,1157,1158,1161],{},"Remove globally installed ",[45,1156,372],{},"\u002F",[45,1159,1160],{},"PyQt6"," from your system Python. Ensure the interpreter exclusively points to the QGIS-bundled environment.",[15,1163,1164,1165,1167,1168,1172,1173,369,1176,1179],{},"If the ",[45,1166,368],{}," import itself keeps failing regardless of which fix you try, work through the focused checklist in ",[19,1169,1171],{"href":1170},"\u002Fpyqgis-fundamentals-environment-setup\u002Fdebugging-pyqgis-scripts\u002Ffixing-pyqgis-module-import-errors\u002F","fixing PyQGIS module import errors",", which traces the exact order in which ",[45,1174,1175],{},"sys.path",[45,1177,1178],{},"PYTHONPATH",", and the bundled site-packages are consulted.",[209,1181,1183],{"id":1182},"pycharm-optimizations-for-pyqgis","PyCharm optimizations for PyQGIS",[15,1185,1186,1187,1137,1190,1193,1194,1197],{},"To maximize productivity, enable PyCharm's ",[45,1188,1189],{},"Type Checking",[45,1191,1192],{},"Inspections"," to navigate PyQGIS type hints effectively. The QGIS Python API includes extensive docstrings, but dynamically generated classes may require manual annotations for optimal IDE support. Configure ",[45,1195,1196],{},"Settings > Editor > Inspections > Python > Type Checker"," to run on save, catching spatial reference mismatches and invalid geometry operations before runtime.",[15,1199,1200,1201,1204,1205,1208,1209,1212],{},"Additionally, mark your project directory as a source root (",[45,1202,1203],{},"Right-click > Mark Directory as > Sources Root","). This ensures PyCharm's navigation and refactoring tools recognize your custom modules alongside QGIS's native packages. When debugging, use ",[45,1206,1207],{},"Run > Debug"," to step through ",[45,1210,1211],{},"QgsProcessingAlgorithm"," implementations and inspect feature attributes in real-time.",[209,1214,1216],{"id":1215},"what-has-to-line-up-before-autocompletion-works","What has to line up before autocompletion works",[15,1218,1219,1220,1222],{},"Three things must agree before PyCharm can resolve ",[45,1221,769],{},", and a setup that gets two of them right produces an editor that runs your code perfectly while underlining every QGIS name in red.",[15,1224,1225],{},[50,1226,1229,1232,1235,1238,1242,1247,1253,1257,1279,1282,1285,1288,1302,1305,1309,1312],{"viewBox":1227,"role":53,"ariaLabel":1228,"xmlns":55},"0 0 760 246","Three requirements for a working PyQGIS setup in an IDE: the correct interpreter, the environment variables, and the QGIS python directory marked as a content root",[57,1230,1231],{},"Three settings that must agree",[61,1233,1234],{},"The project interpreter must be the QGIS-bundled Python so the compiled bindings can load. The run configuration must carry the environment variables so imports resolve at run time. The QGIS python directory must be added as a source root so the editor can index it for completion. Missing the third gives working code with no autocompletion.",[65,1236],{"x":67,"y":67,"width":68,"height":1237,"fill":70},"246",[82,1239,1241],{"x":992,"y":1240,"style":108,"fill":87,"textAnchor":88},"26","Two out of three gives you working code and a red-underlined editor",[65,1243],{"x":1244,"y":1245,"width":1246,"height":138,"rx":77,"fill":78,"stroke":103,"style":80},"16","46","236",[82,1248,1252],{"x":1249,"y":1250,"style":1251,"fill":103,"textAnchor":88},"134","70","text-anchor:middle;font-size:11.5px;font-weight:bold;font-family:sans-serif","1 · the interpreter",[82,1254,1256],{"x":1249,"y":76,"style":1255,"fill":94,"textAnchor":88},"text-anchor:middle;font-size:10px;font-family:monospace","the QGIS-bundled python",[1258,1259,1261,1266,1270,1275],"g",{"style":1260},"font-size:10.5px;font-family:sans-serif",[82,1262,1265],{"x":1249,"y":1263,"style":1264,"fill":94,"textAnchor":88},"132","text-anchor:middle","without it the compiled",[82,1267,1269],{"x":1249,"y":1268,"style":1264,"fill":94,"textAnchor":88},"150","bindings will not load",[82,1271,1274],{"x":1249,"y":1272,"style":1264,"fill":1273,"textAnchor":88},"184","#b91c1c","symptom: ImportError",[82,1276,1278],{"x":1249,"y":1002,"style":1264,"fill":1277,"textAnchor":88},"#59645f","nothing runs at all",[65,1280],{"x":1281,"y":1245,"width":1246,"height":138,"rx":77,"fill":78,"stroke":79,"style":80},"262",[82,1283,1284],{"x":992,"y":1250,"style":1251,"fill":79,"textAnchor":88},"2 · the environment",[82,1286,1287],{"x":992,"y":76,"style":1255,"fill":94,"textAnchor":88},"PYTHONPATH, QGIS_PREFIX_PATH",[1258,1289,1290,1293,1296,1299],{"style":1260},[82,1291,1292],{"x":992,"y":1263,"style":1264,"fill":94,"textAnchor":88},"set on the run",[82,1294,1295],{"x":992,"y":1268,"style":1264,"fill":94,"textAnchor":88},"configuration",[82,1297,1298],{"x":992,"y":1272,"style":1264,"fill":1273,"textAnchor":88},"symptom: no module named",[82,1300,1301],{"x":992,"y":1002,"style":1264,"fill":1277,"textAnchor":88},"runs in a terminal, not here",[65,1303],{"x":1304,"y":1245,"width":1246,"height":138,"rx":77,"fill":78,"stroke":158,"style":80},"508",[82,1306,1308],{"x":1307,"y":1250,"style":1251,"fill":158,"textAnchor":88},"626","3 · the source root",[82,1310,1311],{"x":1307,"y":76,"style":1255,"fill":94,"textAnchor":88},"…\u002Fapps\u002Fqgis\u002Fpython",[1258,1313,1314,1317,1320,1323],{"style":1260},[82,1315,1316],{"x":1307,"y":1263,"style":1264,"fill":94,"textAnchor":88},"added so the editor",[82,1318,1319],{"x":1307,"y":1268,"style":1264,"fill":94,"textAnchor":88},"can index it",[82,1321,1322],{"x":1307,"y":1272,"style":1264,"fill":158,"textAnchor":88},"symptom: no completion",[82,1324,1325],{"x":1307,"y":1002,"style":1264,"fill":1277,"textAnchor":88},"the code runs perfectly",[15,1327,1328,1329,1331,1332,1334],{},"That third symptom is the one worth recognising, because it looks like a broken setup and is actually only a missing index. The code runs, the imports resolve at run time, and the editor simply has no idea what ",[45,1330,769],{}," is because nothing told it where to look. Adding the QGIS ",[45,1333,478],{}," directory as a source root fixes it in one step.",[15,1336,1337,1338,1341],{},"An alternative worth knowing about is the community-maintained PyQGIS type stubs, installable with ",[45,1339,1340],{},"pip",". They give the editor accurate signatures without indexing the whole QGIS tree, which is noticeably faster on a large project — and because they are stubs rather than the real modules, they never interfere with what actually gets imported at run time.",[209,1343,1345],{"id":1344},"key-takeaways","Key takeaways",[217,1347,1348,1364,1380,1391,1400],{},[220,1349,1350,332,1353,1356,1357,1360,1361,1363],{},[223,1351,1352],{},"Always route the interpreter at the QGIS-bundled Python",[45,1354,1355],{},"OSGeo4W"," on Windows, the ",[45,1358,1359],{},"QGIS.app"," framework on macOS, the system Python that carries the bindings on Linux). Never symlink ",[45,1362,47],{}," into a system or conda environment — the ABI must match GDAL, PROJ, and Qt exactly.",[220,1365,1366,265,1369,369,1371,369,1373,1375,1376,1379],{},[223,1367,1368],{},"The environment variables do the heavy lifting.",[45,1370,1178],{},[45,1372,1132],{},[45,1374,1088],{},", and, on Windows, ",[45,1377,1378],{},"QT_QPA_PLATFORM_PLUGIN_PATH"," belong in each PyCharm run configuration, not scattered across the OS.",[220,1381,1382,1387,1388,1390],{},[223,1383,1384,1385],{},"Validate with a headless ",[45,1386,442],{}," before writing real code; a clean ",[45,1389,1148],{}," plus a valid in-memory layer proves the whole chain resolves.",[220,1392,1393,1399],{},[223,1394,1395,1396,1398],{},"Use the ",[45,1397,800],{}," bridge for live debugging."," Stepping through the running QGIS GUI thread is the single biggest productivity gain PyCharm offers over the console.",[220,1401,1402,1405],{},[223,1403,1404],{},"Match versions deliberately."," Pin your project to a QGIS LTR and confirm the PyQt major version so example code stays reproducible.",[15,1407,1408],{},"This configuration bridges the gap between rapid console experimentation and production-grade plugin engineering. With the interpreter, variables, and debugger in place, you are ready to move on to structuring an actual plugin repository and its Qt dialogs.",[209,1410,1412],{"id":1411},"frequently-asked-questions","Frequently Asked Questions",[15,1414,1415,1418,1419,369,1421,373,1423,1425],{},[223,1416,1417],{},"Why must PyCharm use the QGIS-bundled Python instead of a system interpreter?","\nThe ",[45,1420,383],{},[45,1422,386],{},[45,1424,134],{}," modules are compiled against the exact GDAL, PROJ, and Qt versions that ship inside QGIS. A system or virtualenv Python lacks those binaries, so imports fail or crash with ABI mismatches. Pointing the project interpreter at the bundled executable guarantees the bindings resolve correctly.",[15,1427,1428,1431,1432,1434,1435,1137,1437,1440,1441,1443,1444,1446,1447,1449,1450,1452,1453,28],{},[223,1429,1430],{},"Which environment variables does PyCharm need to run PyQGIS scripts?","\nAt minimum set ",[45,1433,1178],{}," to include the QGIS ",[45,1436,478],{},[45,1438,1439],{},"python\u002Fplugins"," directories, ",[45,1442,1132],{}," to the QGIS application root, and prepend the QGIS ",[45,1445,1099],{}," directories to ",[45,1448,1088],{},". On Windows you also typically need ",[45,1451,1378],{}," so the Qt platform plugin is discoverable. Define these per script under ",[45,1454,399],{},[15,1456,1457,1460],{},[223,1458,1459],{},"How do I get code completion for the dynamically generated QGIS classes?","\nAfter indexing the bundled interpreter, PyCharm reads the docstrings shipped with the API, which covers most classes. For dynamically generated members that lack annotations, add type stubs or manual annotations and enable the Python type checker to run on save. Marking your project folder as a Sources Root also helps navigation across your own modules and the QGIS packages.",[15,1462,1463,1466,1467,1470],{},[223,1464,1465],{},"Can I step-debug code that runs inside the live QGIS application?","\nYes. Start a Python Debug Server run configuration in PyCharm, then add a ",[45,1468,1469],{},"pydevd_pycharm.settrace(...)"," call in your plugin or script so the running QGIS process connects back to the IDE. Once attached, breakpoints, variable inspection, and step execution work against the actual GUI thread. This is the most reliable way to debug interactive canvas tools and plugin actions.",[15,1472,1473,1479,1480,352,1482,1484],{},[223,1474,1475,1476,1478],{},"What causes a segmentation fault on ",[45,1477,1148],{}," and how do I fix it?","\nA segfault during initialization almost always means conflicting Qt or PyQt libraries between your system Python and the QGIS-bundled one. Remove any globally installed ",[45,1481,372],{},[45,1483,1160],{}," from the interpreter PyCharm is using, and confirm the interpreter points exclusively at the QGIS environment. Keeping the two Python environments fully separate prevents the binary conflict.",[15,1486,1487,1490,1491,1493],{},[223,1488,1489],{},"Do I need to install PyQGIS with pip?","\nNo, and you cannot — the bindings are compiled C++ extensions that ship inside QGIS. Point the IDE at the QGIS-bundled interpreter instead, and use ",[45,1492,1340],{}," only for your own pure-Python dependencies.",[15,1495,1496,1499,1500,1502],{},[223,1497,1498],{},"Why does my code run but every QGIS name is underlined in red?","\nThe interpreter and environment are right but the editor has not indexed the QGIS ",[45,1501,478],{}," directory. Add it as a source root, or install the community type stubs, and the underlining disappears without changing anything about how the code runs.",[15,1504,1505,1508,1509,1511],{},[223,1506,1507],{},"Can I debug a plugin running inside QGIS from the IDE?","\nYes. Either attach the debugger to the running QGIS process, or have the IDE listen on a port and add a single ",[45,1510,1034],{}," call inside the plugin that connects out to it. The second approach is the one that works across containers and remote machines.",[15,1513,1514,1517],{},[223,1515,1516],{},"Can I run the whole test suite from the IDE?","\nYes, provided the run configuration carries the same environment variables as your ordinary run configuration. The most common failure is a test configuration created separately that inherits none of them, producing import errors only under the test runner.",[15,1519,1520,1523],{},[223,1521,1522],{},"Does the IDE need to be launched from the OSGeo4W shell on Windows?","\nIt is the simplest way, because the shell sets every variable before the IDE starts and the IDE inherits them. Setting them per run configuration works too and is tidier once the setup is stable.",[15,1525,1526,1529],{},[223,1527,1528],{},"Does the debugger slow QGIS down noticeably?","\nOnly while it is attached and stepping. Detach it when you are not actively debugging.",[209,1531,1533],{"id":1532},"related","Related",[217,1535,1536,1544,1550,1556,1569,1578,1584],{},[220,1537,1538,265,1541,1543],{},[223,1539,1540],{},"Up:",[19,1542,34],{"href":26}," — the parent hub for every environment topic.",[220,1545,1546,1549],{},[19,1547,1548],{"href":21},"QGIS Python Console Basics"," — the interactive workflow PyCharm builds on.",[220,1551,1552,1555],{},[19,1553,1554],{"href":434},"Virtual Environments for GIS"," — isolate third-party packages without breaking the bundled interpreter.",[220,1557,1558,1561,1562,369,1564,373,1566,1568],{},[19,1559,1560],{"href":784},"QGIS API Architecture Explained"," — how ",[45,1563,383],{},[45,1565,386],{},[45,1567,134],{}," fit together.",[220,1570,1571,1574,1575,1577],{},[19,1572,1573],{"href":1046},"Debugging PyQGIS Scripts"," — logging, breakpoints, and the ",[45,1576,800],{}," bridge in depth.",[220,1579,1580,1583],{},[19,1581,1582],{"href":38},"Best IDE for QGIS Plugin Development"," — how PyCharm compares with VS Code and Spyder.",[220,1585,1586,1590],{},[19,1587,1589],{"href":1588},"\u002Fpyqgis-fundamentals-environment-setup\u002Fsetting-up-pycharm-for-qgis\u002Fdebug-qgis-plugin-with-debugpy\u002F","Debug a QGIS Plugin with debugpy"," — attach a real debugger to a running QGIS and set breakpoints in plugin code.",[1592,1593,1594],"style",{},"html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sjoCn, html code.shiki .sjoCn{--shiki-default:#9AA79F}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .s9osk, html code.shiki .s9osk{--shiki-default:#FFAB70}",{"title":415,"searchDepth":495,"depth":495,"links":1596},[1597,1598,1599,1600,1601,1604,1605,1606,1607,1608,1609,1610],{"id":211,"depth":495,"text":212},{"id":253,"depth":495,"text":254},{"id":318,"depth":495,"text":319},{"id":392,"depth":495,"text":393},{"id":465,"depth":495,"text":466,"children":1602},[1603],{"id":738,"depth":503,"text":739},{"id":789,"depth":495,"text":790},{"id":1050,"depth":495,"text":1051},{"id":1182,"depth":495,"text":1183},{"id":1215,"depth":495,"text":1216},{"id":1344,"depth":495,"text":1345},{"id":1411,"depth":495,"text":1412},{"id":1532,"depth":495,"text":1533},"Configure PyCharm for QGIS plugin and script development. Set up the PyQGIS interpreter, add stubs for code completion, and connect the remote debugger.","md",{"slug":1614,"type":1615,"breadcrumb":1616,"datePublished":1617,"dateModified":1618},"setting-up-pycharm-for-qgis","guide","Setting Up PyCharm for QGIS","2025-02-16","2026-07-18","\u002Fpyqgis-fundamentals-environment-setup\u002Fsetting-up-pycharm-for-qgis",{"title":5,"description":1611},"pyqgis-fundamentals-environment-setup\u002Fsetting-up-pycharm-for-qgis\u002Findex","7mWv1ICEYPez5vMfMkeuGXvPTJkylbpY9hR_tSeb6pU",1787823360565]