Questions tagged [ptvs]

Python Tools for Visual Studio turns Visual Studio into a Python IDE. It's a free & open source plug-in for Visual Studio, written and supported by Microsoft and community.

Python Tools for Visual Studio turns Visual Studio into a Python IDE. It's a free & open source plug-in for Visual Studio from Microsoft. PTVS enables developers to use all the major productivity features of Visual Studio to build Python code using either CPython or IronPython and adds new features such as attaching to running Python processes and debugging mixed Python/C++ code.

212 questions
1
vote
0 answers

python tools for visual studio: "The current thread is not currently running code or the call stack could not be obtained"

I am using python tools for visual studio and when I put a breakpoint in the class constructor I get a gray tab saying: No Source Available "The current thread is not currently running code or the call stack could not be obtained" How to fix that?
Hanan Shteingart
  • 8,480
  • 10
  • 53
  • 66
1
vote
1 answer

Python Tools - Unable to run commands in interpreter

I'm trying to get south working in my Visual Studio environment but I can't seem any of the commands shown in the tutorial to work like manage.py schemamigration movies --initial that will just show the following error File "", line 1 …
sgtfrankieboy
  • 1,020
  • 3
  • 13
  • 30
1
vote
1 answer

python tools for visual studio does not accept //

I am using mechanize. My code works well if I ran in CMD console, but on Visual Studio IDE, I got this error "unsupported operand type(s) for +: 'instance' and 'str'" at line br.open('http://gmail.com') My code is import mechanize import…
John
  • 3,888
  • 11
  • 46
  • 84
1
vote
1 answer

Problems with installing python tools for visual studio 2010

I installed iron python 2.7.3 and python tools for visual studio 1.1 but when i try to create a new python project it only offers me to create a command-line application. I wanted to create a GUI with iron Python so i was looking forward to create a…
Yui
  • 103
  • 1
  • 2
  • 15
1
vote
1 answer

Python Tools for Visual Studio set breakpoint in child process

Is there a way I can set a breakpoint in a child process that Visual Studio can be attached to? I haven't had success with anything I've tried. Example code below. child = multiprocessing.Process(target=foo) def foo(): print "This is the child…
Alex Wade
  • 659
  • 1
  • 7
  • 27
1
vote
2 answers

PyMySQL UnicodeEncodeError; python shell successes but cmd fails

I'm new to pymysql module and trying to discover it, I have a simple code: import pymysql conn=pymysql.connect(host="127.0.0.1", port=8080,user="root", passwd="mysql", …
Seçkin Savaşçı
  • 3,446
  • 2
  • 23
  • 39
0
votes
1 answer

Python [WinError 5] Access is denied in Visual Studio 2019

I am trying to add some code to the git-p4.py script and the program is now failing when I attempt to run it in Visual Studio 2019 professional. I get the same error with python3.7.4 or 3.8.0 (I uninstalled python2.7 attempting to address this but I…
Ben Keene
  • 459
  • 4
  • 7
0
votes
1 answer

How to debug mpirun Python processes in Visual Studio Code on Ubuntu?

Create /home/bob/foobar.py in Visual Studio Code with the VS Code Docker Extension import ptvsd import time ptvsd.enable_attach(address = ('0.0.0.0', 5678)) ptvsd.wait_for_attach() time.sleep(2) print("all righty then") Set a breakpoint on…
empty
  • 5,194
  • 3
  • 32
  • 58
0
votes
1 answer

Python args: django debugging arg set up for django manage.py

I want to enable debugging using visual studio debugging tool, ptvsd. Using that I have to attach the debugger to the application using ptvsd.enable_attach(address=(settings.REMOTE_URL, settings.DEBUG_PORT),…
otong
  • 1,387
  • 2
  • 17
  • 28
0
votes
1 answer

Cannot see current debugged line in Visual Studio Code / Python / ptvsd

While remote debugging a simple Python program on a Raspberry, from a PC, it seems to work correctly (hitting F10 or F5 does what it should) except that I cannot see the current line debugged (the current line is not highlighted). Also, the…
Esppat
  • 160
  • 1
  • 1
  • 6
0
votes
1 answer

How to determine when function overrides another in the chain of inheritance?

I am using PTVS assemblies to generate strongly typed bindings for a Python library. I've got an instance of ModuleAnalysis, which I use to perform various queries about guessed types in Python code. At this moment I stumbled upon a need in my C#…
LOST
  • 2,956
  • 3
  • 25
  • 40
0
votes
3 answers

PTVS - general IntelliSense problems - no error highlighting, no recognition of modules from other projects

I have used PTVS for two years now, and I remember (am I going crazy?) that PTVS always highlighted errors when working on a .py file in Visual Studio. As of ~ Oct 10th (possible connected with v15.4 of VS2017), there have been issues with PTVS. In…
0
votes
1 answer

python tools for Visual studio 2015 debugging slow when importing gensim package

I am using PTVS in VS 2015 to write python code. When I write import gensim library and start debugging using F5, Debugger takes around 5 mins to load the library and move to next line. from gensim import utils a. How do I fix this problem? b. If…
Garuda
  • 385
  • 5
  • 17
0
votes
1 answer

PTVS lxml code completion does not work

I am trying to use lxml package to parse XML file. Simple code work well in python interpreter. But, PTVS code completion does not show anything about package. Thus I must find everything by look up API document. It feels like i am using Text…
ibocon
  • 1,352
  • 3
  • 17
  • 40
0
votes
1 answer

PTVS IntelliSense not working for Built-in Function

class Class: def __init__(self, path): self._path = path string = open(self._path, 'r'). #HERE When I try to type read() intelliSense says no completions. However, I know open() function returns file object, which has read() function. I…
ibocon
  • 1,352
  • 3
  • 17
  • 40