Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(self, iface):
import debugpy

self.debugpy = debugpy
self.debugpy.configure(python=get_qgis_python_path())
except:
pass
self.port = 5678
Expand Down Expand Up @@ -160,3 +161,13 @@ def run(self, checked):

self.debugpy.wait_for_client()
exec(open(filename).read())

def get_qgis_python_path():
if sys.platform.startswith("linux"):
return sys.executable
pythonExec = os.path.dirname(sys.executable)
if sys.platform == "win32":
pythonExec += "\\python3"
else:
pythonExec += "/bin/python3"
return pythonExec