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?

  • REPL prompt does not work in my VS 2015 QGIS 2.12 Lyon. It appears I have set up python environment correctly in PTVS mostly using autocomplete. The intellisense refresh database is always incomplete. The interactive window freezes. Simple code encounters error module _ctypes not found. I simply want to do code an application and not a plugin, so the answer does not apply, and it does not appear correct to me in any case
    – subsci
    Commented Dec 15, 2015 at 21:40

1 Answer 1


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
  • 1
    Thank you for the answer. Do you also know how to setup intellisense? Commented Oct 21, 2015 at 17:49
  • for my code it works by defualt. I did not know how to setup the intellisense for QGIS API. Lets add this to your question. Commented Oct 21, 2015 at 21:15
  • also if you think answer is correct please mark it. Commented Oct 21, 2015 at 21:21
  • @NikhilMurarka can you please share your Visual Studio Python environment configuration? How do you set up Visual Studio to connect to the correct version of Python that QGIS is using? What is the Prefix Path, Interprepter Path etc? Thanks
    – narmaps
    Commented Jul 8, 2016 at 22:47
  • @NikhilMurarka Hi Nikhil, will you share how to add python environment for VS and how the process of qgis added.
    – Sachin
    Commented May 14, 2018 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.