[GIS] Setting up a QGIS Plugin Development Environment in Visual Studio and PTVS

pythonqgisvisual studio

I would like to create a plugin using Visual Studio 2015 and Python tools (PTVS). I have a basic hello world plugin written outside visual Studio and It loads fine in QGIS 2.10 Pisa. I have installed the Visual Studio and PTVS and I am looking for a way to work using the Visual Studio Environment.

I have set up a Python environment within visual studio however I cannot get the REPL prompt to work. Has anyone done anything similar?

Best Answer

You can debug plugin in Visual Studio 2015.

  1. Create project file for VS2015 and add break points in code.
  2. Start QGIS dont load plugin.
  3. Go to Debug -> Attach To Process (Ctrl + Alt + P). Find the qgis process and attach to it.
  4. Break point is hit and you can debug