Extension stops working when code has too many imports in the same line
See original GitHub issueEnvironment data
- VS Code version: 1.35.1, 1.36.1
- Extension version (available under the Extensions sidebar): 2019.6.24221
- OS and version: Windows 10 Enterprise
- Python version (& distribution if applicable, e.g. Anaconda): 2.7
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Relevant/affected Python packages and their versions: N/A
- Jedi or Language Server? (i.e. what is
"python.jediEnabled"
set to; more info #3977): Jedi is OFF
Expected behaviour
Debugger should work
Actual behaviour
Debugger is not working after opening a specific Python file
Steps to reproduce:
- Unzip the test project: https://www.dropbox.com/s/railr60ddnp6k2c/bad_file.zip
- Open test.py and launch the debugger. It works
- Open bad_file.py
- Switch back to test.py and try to launch the debugger again. It will not run.
The whole extension seems to be broken at this point. Outline view is blank. Intellisense not working…
Screen recording of this scenario: https://www.dropbox.com/s/2dse3bq6jbd4wf3/bad_file.mp4
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
Nothing interesting there:
Starting Microsoft Python language server.
[Info - 2:46:30 PM] Analysis cache path: C:\Users\GLEBSturov\AppData\Local\Microsoft\Python Language Server
[Info - 2:46:30 PM] GetCurrentSearchPaths C:\Programs\Python27\python.exe
[Info - 2:46:30 PM] Interpreter search paths:
[Info - 2:46:30 PM] c:\programs\python27\dlls
[Info - 2:46:30 PM] c:\programs\python27\lib
[Info - 2:46:30 PM] c:\programs\python27\lib\lib-tk
[Info - 2:46:30 PM] c:\programs\python27
[Info - 2:46:30 PM] c:\programs\python27\lib\site-packages
[Info - 2:46:30 PM] User search paths:
[Info - 2:46:30 PM] Microsoft Python Language Server version 0.3.20.0
[Info - 2:46:30 PM] Initializing for C:\Programs\Python27\python.exe
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging
)
Nothing interesting there
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
Problem with two imports on the same line in VSCODE with ...
When saving a file, I get two imports ... from ... in a single line, for example: import { PanelGroup } from 'rsuite';import...
Read more >Don't multi-line imports (let them take less space) / Conflict ...
Hi. There is a bug somewhere when builtin VSCode's source.organizeImports feature is used together with Prettier. People sometimes prefer to ...
Read more >6 Common CSV Import Errors and How to Fix Them - Flatfile
One of the most common CSV import errors is that the file is simply too large. That can be caused by too many...
Read more >C/C++ extension FAQ - Visual Studio Code
Frequently asked questions about the C/C++ extension in Visual Studio Code. ... How do I get the new IntelliSense to work with MinGW...
Read more >Classes should not have too many "static" imports
Java static code analysis. Unique rules to find Bugs, Vulnerabilities, Security Hotspots, and Code Smells in your JAVA code.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@DonJayamanne I can reproduce it in the older version of the extension (
2019.6.24221
), but no longer on the latest version of the extension. I am guessing this issue was related to sending telemetry for imports. We can close this now.@karrtikr I’m unable to repro this. Are there any errors? Is this a debugger issue or extension issue? FYI - I’m unable to repro this.