microsoft / vscode-python Goto Github PK
View Code? Open in Web Editor NEWThis project forked from donjayamanne/pythonvscode
Python extension for Visual Studio Code
Home Page: https://aka.ms/pvsc-marketplace
License: MIT License
This project forked from donjayamanne/pythonvscode
Python extension for Visual Studio Code
Home Page: https://aka.ms/pvsc-marketplace
License: MIT License
From @kuza55 on November 18, 2016 14:58
Since windows processes can now call bash.exe to call processes in the WSL subsystem, it would be nice if VS code could:
a) Be configured to utilise a python interpreter inside WSL through bash.exe
b) Automatically find WSL virtualenvs in the current project and let the user use them easily
Making the Jupyter integration work in this scenario would also be very cool.
Copied from original issue: DonJayamanne/pythonVSCode#534
VS Code version: 1.18
Python Extension version: 0.8.0
Python Version: x
OS and version: Win 10 1703 x64
Set to: https://github.com/DonJayamanne/pythonVSCode/issues/1188
Upon clicking Fix docstring formatting #1188
in the extension changelog (in VSCode, after clicking Upgrade but before clicking Reload) Take me to issue in proper Repo.
From @zeus on January 7, 2017 17:23
VS Code version: 1.8.1
Python Extension version: 0.5.5
Python Version: 2.7.13
OS and version: Windows 10
Your launch.json (if dealing with debugger issues):
{
"name": "Attach (Remote Debug)",
"type": "python",
"request": "attach",
"localRoot": "${workspaceRoot}",
"remoteRoot": "${workspaceRoot}",
"port": 4000,
"secret": "my_secret",
"host":"localhost"
}
Your settings.json:
Output from Python
output panel
None
Output from Console window
(Help->Developer Tools menu)
index.js:22 [uncaught exception]: Error: TypeError: Cannot read property 'Threads' of undefined
at PythonDebugger.threadsRequest (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\out\client\debugger\Main.js:321:27)
at PythonDebugger.DebugSession.dispatchRequest (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\node_modules\vscode-debugadapter\lib\debugSession.js:421:22)
at PythonDebugger.ProtocolServer._handleData (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\node_modules\vscode-debugadapter\lib\protocol.js:104:38)
at Socket.<anonymous> (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\node_modules\vscode-debugadapter\lib\protocol.js:24:60)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:543:20)onError @ index.js:22(anonymous function) @ index.js:91emitOne @ events.js:96emit @ events.js:188window.onerror @ C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\renderer\init.js:120i.globals.onerror @ errorTelemetry.ts:64
index.js:25 Error: TypeError: Cannot read property 'Threads' of undefined
at PythonDebugger.threadsRequest (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\out\client\debugger\Main.js:321:27)
at PythonDebugger.DebugSession.dispatchRequest (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\node_modules\vscode-debugadapter\lib\debugSession.js:421:22)
at PythonDebugger.ProtocolServer._handleData (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\node_modules\vscode-debugadapter\lib\protocol.js:104:38)
at Socket.<anonymous> (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\node_modules\vscode-debugadapter\lib\protocol.js:24:60)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:543:20)
at file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:90:21136
at Object.v [as _notify] (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:32:13263)
at Object.enter (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:32:16768)
at _run (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:32:18089)
at _error (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:32:17606)
at file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:85:1178
at _.e.dispatch (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:85:2523)
at _.e.handleData (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:85:2035)
at Socket.<anonymous> (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:85:1038)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
Debug adapter process has terminated unexpectedly
Attach to simple process
#!/usr/bin/env python
import ptvsd
ptvsd.enable_attach("my_secret", address=('0.0.0.0', 4000))
ptvsd.wait_for_attach()
t = 1+1
Connected from MS VS 2015 successfully.
Can't connect from VSC with 'attach' option. 'Launch' works fine.
Copied from original issue: DonJayamanne/pythonVSCode#626
From @sfermigier on January 16, 2017 11:28
Issue #183 being now closed, here's an independent issue for a feature suggestion that I find really important: inline reports for coverage.py
results (or pytest --cov
, etc.).
Copied from original issue: DonJayamanne/pythonVSCode#647
From @satyenr on May 13, 2016 3:37
The ability to run code on a remote machine is awesome. You can develop on a Windows PC or a Mac while running and debugging on a remote Linux server. PyCharm supports such a feature - https://www.jetbrains.com/help/pycharm/2016.1/configuring-remote-python-interpreters.html.
Having a remote interpreter also helps when the remote machine already has a functional Python environment - possibly managed by someone else - which you don't want to/can't replicate on your local machine.
Copied from original issue: DonJayamanne/pythonVSCode#123
VS Code version: Code 1.18.0 (dcee2202709a4f223185514b9275aa4229841aa7, 2017-11-08T12:44:48.751Z)
Python Extension version: 0.8
Python Version: 2.17.2
OS and version: Ubuntu 16.04
$ ctags --version
Exuberant Ctags 5.9~svn20110310, Copyright (C) 1996-2009 Darren Hiebert
Addresses: [email protected], http://ctags.sourceforge.net
Optional compiled features: +wildcards, +regex
Where project have space in path tags
file in .vscode
folder is not generate. visual studio cod
e does not indicate a problem.
Windows (10) have similar problem.
generate ctags when space is inside project path
code "/home/user/Desktop/repos/test space"
when I in console write (relative path):
$ ctags --options=/home/user/.vscode/extensions/ms-python.python-0.8.0/resources/ctagOptions --languages=Python --exclude=**/site-packages/** -o ./.vscode/tags .
then tags
file is generate.
Output from Python
output panel
ctags --options=/home/user/.vscode/extensions/ms-python.python-0.8.0/resources/ctagOptions --languages=Python --exclude=**/site-packages/** -o ./.vscode/tags .
ctags: cannot open tag file : No such file or directory
Output from Console window
(Help->Developer Tools menu)
``
One of the few missing features is to have auto imports.
Something like what was just released in vscode 1.18 for javascript would be great.
VS Code version: 1.18.0
Python Extension version: 0.7.0
Python Version: 3.6.0
OS and version: Microsoft Windows [Version 10.0.15063]
I've written a tool that given a tabular data structure with many thousands of columns creates a new Python class definition (into a .py file). The resulting Python file is used by data scientists to access the columns of the data structure in a programmatic way.
Each column results in generated code in this pattern currently:
@property
def color(self):
"""
This is the documentation.
This is the second line of documentation
"""
return DataColumn(self, 'COLOR')
For generated files with hundreds of columns, the VS Code Python extension works spectacularly. However, for large files, it slows to a crawl. For example, one data structure results in a Python file with 40,000+ lines.
When using code completion in VS Code, it takes 20+ seconds to show the list of properties. Needless to say, that's too slow. And unfortunately, it's not a one time cost as every instantiation of the code completion feature causes the same delay.
I can adjust the output of the my code generation tool, but I don't know what I could do to reduce the parse time for code completion.
I did experiment and removed the documentation from the Python file and that had very little if any noticeable effect on the time taken to show matches.
Fast code completion suggestion list (under 1 second).
Super large python file with class with thousands of properties is needed. I've created this public gist with an example.
Output from Python
output panel
Empty.
Output from Console window
(Help->Developer Tools menu)
Empty
VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: 2.7.14
OS and version: Windows 10
Press Ctrl+F5 to start a python program without the debugger, and VS Code displays the error
"Cannot read property 'openConfigFile' of undefined"
F5 to start with the debugger works fine.
Should just start the program. It always did with Python Extension 0.7.0, which I had been using for some time.
Start any python program inside version 0.8.0 of this extension, without the debugger.
No output
From @weqopy on November 9, 2017 13:32
Steps to Reproduce:
Reproduces without extensions: Yes/No
Copied from original issue: microsoft/vscode#37946
VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: 2.7.14
OS and version: Linux, Gentoo
When writing code, the popup when typing the opening bracket of a function only has one argument and no documentation information.
It would be great to have the popup more like the hover window, so that I can see the whole signature and perhaps have an option to display the docstring too.
This has been brought up before in https://github.com/DonJayamanne/pythonVSCode/issues/598
VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: 3.5.3 Anaconda 4.0.0
OS and version: Widows 10 Professional
"Symbol Rename" for a Python symbol fails to rename in about 50% of cases. The symbol remains as its old name and is not renamed
Rename to rename symbols everytime.
Output from Python
output panel
No output
Output from ```Console window``` (Help->Developer Tools menu)
No output
From @seozed on August 12, 2016 8:24
I want to test my Scrapy spiders using it. Anyone knows how to do that please?
Copied from original issue: DonJayamanne/pythonVSCode#249
VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: 2.7/3.6
OS and version: Windows 7 x64
print 'Hello, world!'
)See errors for selected version of python
Output from Python
output panel
##########Linting Output - pylint##########
No config file found, using default configuration
Output from Console window
(Help->Developer Tools menu)
VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: 3.6.3
OS and version: Windows 10 v1709 build 16299.19
/usr/bin/python3 d:/Web/test.py
/usr/bin/python3 /mnt/d/Web/test.py
Output from Python
output panel
/usr/bin/python3: can't open file 'd:/Web/test.py': [Errno 2] No such file or directory
On the old repo was an issue regarding a slow behavior of ptvsd, especially with remote debugging. I think was a pull request pending, by the way.
Can we expect support for other debuggers like pydevd? (Standard debugger on PyCharm, very fast)
Thank you, and congratulations on joining MS VSCode Team.
VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: Python 3.6.3 :: Anaconda, Inc.
OS and version: Mac OS 10.13.1
Interpreter selection does not include the Anaconda root Python (located at ~/anaconda3/bin/python) when VSCode is launched from the Applications folder. It only includes the default Apple Python and the Anaconda conda environments (located at ~/anaconda3/envs//bin/python). Anaconda is not in my default PATH. If I launch VSCode from the command line with Anaconda in my PATH then it does appear in the list of interpreters.
Root Anaconda Python should always be available to select from the interpreter selection menu
Output from Python
output panel
----------Generating Tags----------
ctags --options=/Users/mfairley/.vscode/extensions/ms-python.python-0.8.0/resources/ctagOptions --languages=Python --exclude=**/site-packages/** -o /Users/mfairley/Source/cs238/.vscode/tags .
/Library/Developer/CommandLineTools/usr/bin/ctags: illegal option -- -
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
Linting with pylint failed.
You could either install the 'pylint' linter or turn it off in setings.json via "python.linting.pylintEnabled = false".
Error: Command failed: /usr/bin/python -m pylint --msg-template='{line},{column},{category},{msg_id}:{msg}' --reports=n --output-format=text /Users/mfairley/Source/cs238/p2/python/deep_learning.py
/usr/bin/python: No module named pylint
Output from Console window
(Help->Developer Tools menu)
[Extension Host] Linter 'pylint' not installed.
t.log @ workbench.main.js:sourcemap:9
workbench.main.js:sourcemap:9 [Extension Host] (node:19853) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
t.log @ workbench.main.js:sourcemap:9
t._logExtensionHostMessage @ workbench.main.js:sourcemap:9
(anonymous) @ workbench.main.js:sourcemap:9
emitTwo @ events.js:106
emit @ events.js:194
process.nextTick @ internal/child_process.js:766
_combinedTickCallback @ internal/process/next_tick.js:73
_tickCallback @ internal/process/next_tick.js:104
I know it's not usual in the Python environment, but adding support for regions, which are in turn supported by VSCode since 1.17[1], would be a really nice feature. Often I work with large classes which have a lot of methods, which are grouped already, but being able to completely fold all regions I'm not working on right now would make for a smoother editing experience I think.
[1] https://code.visualstudio.com/updates/v1_17#_folding-regions
Since this is now the primary repository for development of the plugin, can you see if @DonJayamanne is willing to transfer the ownership?
https://help.github.com/articles/transferring-a-repository-owned-by-your-personal-account/
Without a transfer this fork cannot be searched, search will only work on the original repository. When I try I get the following:
Sorry, forked repositories are not currently searchable.
You could try searching the parent repository.
VS Code version: 1.18.0
Python Extension version: 0.8.0
Python 2 Version: 2.7.14
Python 3 Version: 3.6.2
OS and version: Fedora 26 x86_64
The extension always starts when debugging any kind of project.
The extension probably shouldn't start when debugging projects that do not contain any python code.
launch.json
fileF5
From what I see in package.json
's activation events, it looks like it's supposed to activate on any debugging session. However I don't see the point, as it only slows down debugging other projects.
I know I can just disable the extension for non-python projects, but that activation event still seems a bit overkill. Is there a reason for not using "workspaceContains:**/*.py"
(and a few others for other extensions) instead ?
From @sevetseh28 on August 31, 2016 14:40
cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
cur.execute(sql_query)
row = cur.fetchone()
Doing that returns None even if there is one record in the query result. Tried running the exact same code and debugging it with PyCharm and I get the correct result in the row variable.
If I create the normal cursor
cur = conn.cursor()
cur.execute(sql_query)
row = cur.fetchone()
row is not None in the VS Code debugger, so there is clearly a bug with the DictCursor type.
Copied from original issue: DonJayamanne/pythonVSCode#279
VS Code version: 1.18
Python Extension version: 0.8.0
Python Version: 3.6.3
OS and version: Windows_NT x64 10.0.15063
Once the extension is enabled everything in vscode related to debugging (Start Debugging, Open Configurations etc.) stops working. All other languages (e.g. C++) are affected as well. Disabling vscode-python extension restores normal operation. It worked before upgrade to 1.18/0.8.0 without a problem.
Working debug
Output from Python
output panel
(none printed where)
Output from Console window
(Help->Developer Tools menu)
(none printed where)
VS Code version: 1.18.0, 1.17.2
Python Extension version: 0.8.0
Python Version: 2.7.14
OS and version: Fedora 26 (4.13.11-200.fc26.x86_64), GNOME Shell 3.24.3
Nothing happens after, e.g., exceeding a line
The line exceeding 80 chars gets underlined after a while
Output from Python
output panel
Output from Console window
(Help->Developer Tools menu)
file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js [Extension Host] (node:23105)
DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
raw.marked.js:15 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.
raw.marked.js:15 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive.
raw.marked.js:15 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.
raw.marked.js:15 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive.
raw.marked.js:15 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.
raw.marked.js:15 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive.
Config:
"python.linting.pep8Enabled": true,
"python.linting.flake8Enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.lintOnTextChange": true,
"python.linting.lintOnSave": false
If I turn lintOnSave
to true
(which is the default, there's a bug in the docs - https://code.visualstudio.com/docs/python/linting), the issues in source code get properly marked on file save.
From @tillahoffmann on December 20, 2016 12:31
It would be great if it was possible to jump to the failing line in a test from the "Python Test Log" console in the IDE.
Copied from original issue: DonJayamanne/pythonVSCode#596
I'm not %100 sure if this is the place for this issue. However, I don't think it's a general issue with VS Code because of what was said in this issue.
VS Code version: 1.17.2
Python Extension version: 0.7.0
Python Version: 3.6.2
OS and version: Windows 10 Home, 1703
When debugging, the "Arguments" tab inside VARIABLES defaults to closed.
Arguments are pretty important, perhaps this should default to open, like it does for local variables? Or at least have an option to toggle this behaviour.
Debug any Python program
Output from Python
output panel
Output from Console window
(Help->Developer Tools menu)
Is it possible to gray out unused imports in the same way that PyCharm does?
$ python2 -m flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
$ python3 -m flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
VS Code version: October 2018
Python Extension version: 0.8.0
Python Version: 2.7
OS and version: Ubuntu 16.04 macOS Sierra
My PYTHONPATH gets augmented by my development workspace when I compile the workspace. This means that python modules not in a standard location are still found by python. However, they don't seem to be picked up by the autocomplete capability. I cannot set an explicit path using python.autoComplete.extraPaths
because the path changes.
Is PYTHONPATH not used as a lookup for autocomplete?
Any suggestions on how to address this?
An example PYTHONPATH I end up with is: /Users/ablakey/ros_catkin_ws/install_isolated/lib/python2.7/site-packages:/Users/ablakey/ws/devel/lib/python2.7/site-packages
Thank you!
VS Code version:
Python Extension version:
Python Version:
OS and version:
ubuntu 17.10
anaconda python 3.6.3
/home/yolen/Desktop/data-analysis/azureenv/bin/python -m pip install pep8
yolen@yolen-ThinkPad-X260:~/Desktop/data-analysis$ /home/yolen/Desktop/data-analysis/azureenv/bin/python -m pip install pep8
Traceback (most recent call last):
File "/home/yolen/scicomp/anaconda3/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/home/yolen/scicomp/anaconda3/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/home/yolen/scicomp/anaconda3/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/home/yolen/Desktop/data-analysis/azureenv/lib/python3.6/site-packages/pip/__init__.py", line 28, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/home/yolen/Desktop/data-analysis/azureenv/lib/python3.6/site-packages/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/home/yolen/Desktop/data-analysis/azureenv/lib/python3.6/site-packages/pip/download.py", line 36, in <module>
from pip.utils.glibc import libc_ver
File "/home/yolen/Desktop/data-analysis/azureenv/lib/python3.6/site-packages/pip/utils/glibc.py", line 4, in <module>
import ctypes
File "/home/yolen/scicomp/anaconda3/lib/python3.6/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ImportError: /home/yolen/Desktop/data-analysis/azureenv/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _PyUnicode_AsWideCharString
yolen@yolen-ThinkPad-X260:~/Desktop/data-analysis$ ^C
yolen@yolen-ThinkPad-X260:~/Desktop/data-analysis$
Output from Python
output panel
Output from Console window
(Help->Developer Tools menu)
VS Code version: 1.19.0-insider
Python Extension version: 0.8.0
Python Version: 2.7.12, 3.5.2, 3.6.3
OS and version: Ubuntu 16.04
As I mention above, I have three python version installed on my computer, but the only python that shows up when running command python: select interpreter is python 2.7.12. See picture bellow.
Extension also will only list python 2.7.12 + the one that I already set on workspace configuration file (manually).
It should list all three python version, including those that running on virtual environment
Hello,
I reopen my issue here since it has been removed on the last repo.
VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: 3.5
OS and version: Ubuntu 16.04
I am not able to debug a django application with a postgres database
I should be able to debug a django application with a postgres database
Output from Python
output panel
there is no output
Output from Console window
(Help->Developer Tools menu)
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [/home/johndoe/.vscode/extensions/ms-vscode.cpptools-0.14.2]: La commande 'workbench.action.gotoSymbol' apparaît plusieurs fois dans la section 'commands'.
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [/home/johndoe/.vscode/extensions/ms-vscode.cpptools-0.14.2]: La commande 'workbench.action.showAllSymbols' apparaît plusieurs fois dans la section 'commands'.
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] vscode-icons is active!
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] activating extension
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] rejected promise not handled within 1 second
t.log @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:10 spawn ctags ENOENT : Error: spawn ctags ENOENT
at exports._errnoException (util.js:1050:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
e.onUnexpectedError @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:10
console.ts:123 [Extension Host] (node:9600) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
t.log @ console.ts:123
t._logExtensionHostMessage @ extensionHost.ts:377
(anonymous) @ extensionHost.ts:202
emitTwo @ events.js:106
emit @ events.js:194
process.nextTick @ internal/child_process.js:766
_combinedTickCallback @ internal/process/next_tick.js:73
_tickCallback @ internal/process/next_tick.js:104
From @horserma on December 22, 2016 0:48
Hi guys, I am using vscode for writing python code. I found when I tried to fill in a function with parameters, the hint will be shown one by one instead of all. For example, if the function has 3 parameters, the hint will show the first one first and after I fill in it and write a comma, the second will be triggered. I just want to show them all to get clear what parameters I am going to fill in. Any suggestions?
Copied from original issue: DonJayamanne/pythonVSCode#598
From @DonJayamanne on September 9, 2016 23:40
Reported on reddit:
https://www.reddit.com/r/programming/comments/51t7no/visual_studio_code_august_2016_15/d7f31jv
I occasionally get "RuntimeError: release unlocked lock" when debugging Python.
Copied from original issue: DonJayamanne/pythonVSCode#298
Is it possible to keep the focus on the editor after running a selection / line of code? This is really useful when running the code step wise.
VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: 3.5
OS and version: Linux Ubuntu
Errors during development, but running python works normally. In case the imported db
is a class that returns SQLAlchemy()
Do not display code inconsistency for cases like the one presented above.
Create db.py
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
Use this importing db in the model class and declare the variables the way I presented in the print above.
From @roblourens on October 26, 2016 22:16
Simple script, debugging with the system's python3.5, and when i step all the way to the end, it says "python quit unexpectedly". Not sure why or whether there's anything you can do about it. Right now it's happening about 2/3 times.
Copied from original issue: DonJayamanne/pythonVSCode#465
Getting "ImportError: No module named 'pymongo'" after recent update. Is the extension suddenly defaulting to using venv? Why? And how do I get rid of that?
VS Code version: 1.18 insiders
Python Extension version: 0.8.0
Python Version: 3.6
OS and version: macOS 10.13.2
Python binary (${workspaceRoot}/.direnv/python-3.6.3/bin/python
) is not on the list.
Python binary should be listed.
direnv
(https://direnv.net/).envrc
file with layout python3
or layout python
as its contentsdirenv allow
From @DonJayamanne on June 16, 2016 2:9
Copied from original issue: DonJayamanne/pythonVSCode#165
VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: 3.6.3
OS and version: Windows 10, build 15063.674
Whenever I finish debugging, I always get a "Debug adapter process has terminated unexpectedly" error if I have a "console" option enabled in my launch.json (I get the error with both external terminal and integrated terminal).
When I finish debugging, I don't want the error to appear.
-Create a launch.json with the "console": "externalTerminal".
-Create a Hello World program and debug it
Output from Python
output panel
Output from Console window
(Help->Developer Tools menu)
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] activating extension
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:9 Debug adapter process has terminated unexpectedly
e.doShow @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:9
messageService.ts:126 Debug adapter process has terminated unexpectedly
e.doShow @ messageService.ts:126
e.show @ messageService.ts:105
_.onServerExit @ rawDebugSession.ts:535
(anonymous) @ rawDebugSession.ts:449
emitTwo @ events.js:111
emit @ events.js:194
__dirname.ChildProcess._handle.onexit @ internal/child_process.js:215
console.ts:123 [Extension Host] (node:55272) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
t.log @ console.ts:123
t._logExtensionHostMessage @ extensionHost.ts:377
(anonymous) @ extensionHost.ts:202
emitTwo @ events.js:106
emit @ events.js:194
process.nextTick @ internal/child_process.js:766
_combinedTickCallback @ internal/process/next_tick.js:73
_tickCallback @ internal/process/next_tick.js:104
VS Code version: 1.18.0
Python Extension version:
Python Version: 0.8.0
OS and version: Ubuntu 16.04 based Linux and Windows 10
vscode tries to provide auto complete suggestions inside python strings every time period is pressed. This doesn't happen in c/c++
files, don't know about other file types. Also comments doesn't seem to be affected.
Settings tweaks tested with no effect:
"editor.quickSuggestions": {"other": false, "comments": false, "strings": false}
"editor.wordBasedSuggestions": false
Period triggered suggestions are pretty messed up in general, e.g. typing 1.
results in suggestion list and, if, in, is, not, or
. Very useful.
Strings shouldn't be treated as code in general. Let me write docstrings in peace.
".
Nothing related.
From @vidartf on December 15, 2016 12:25
Add a profiler, preferably a line profiler which can overlay its output on top of source (in own view, or on top of existing source?).
Copied from original issue: DonJayamanne/pythonVSCode#580
VS Code version: 1.19 Insider
Python Extension version: 0.8.0
Python Version: 3.6.1
OS and version: Windows 10 1709
Do nothing.
When I push Disable Linter, stop linter and write disable option to settings.json
Thanks for all efforts from contributors of this great extension, specially @DonJayamanne.
With Microsoft taking over the ownership of the extension, will the extension adopt the language server protocol model?
If So...
What sort of timeline could we expect? Will Microsoft VSC-Python team use (and contribute to) or fork palantir/python-language-server or sourcegraph/python-langserver LSP projects? Or will they create its own Python LSP?
VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: 3.6
OS and version: Windows 10
Python file does not get executed in Python terminal
Python file gets executed in Python terminal
Output from Python
console
T:\a>python t:/a/a.py
hello world!
T:\a>text_left_herepython t:/a/a.py
'text_left_herepython' is not recognized as an internal or external command,
operable program or batch file.
This is a problem for me because I use a lot of key bindings, sometimes the terminal is in focus and my shortcuts are written in the terminal (for example ^A
). I need the builtin terminal for a few commands. Unfortunately if you type in a chain command command1 && command2
the first command gets executed and the second one will be merged with python.
PS: One can easily delete python and the .py file, if
"rm "
is written in the Python terminal then "Python: Run Python File in Terminal" is called. (Don't Try This at Home)
Nothing happened when you run simple hello world script for a second time without debugging.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.