Closed jingyulong closed 4 years ago
What is the Python file content? I.e. could you provide list of modules you are importing. Some libraries are very large (thousands of files) and LS analyzes all code, including libraries. Also when you say computer crashes
do you mean OS dies, or VS Code or LS process? Thanks.
Log shows a lot of
[Info - 11:26:01 AM] Reloading modules...
this means LS is unable to separate user code from libraries and saving files triggers full analysis, like pip install
for example. Could you please provide your search paths setting.
@jakebailey - fyi
@MikhailArkhipov Thank you for your reply. Since this problem only happened on the computer I work for, I have no time to check it out.
I reproduce this problem today and found that as long as I open a py file and loading the python extension, reloading modules will be repeated... there is no import module, only one line of print code. Such as : print("Hello Word")
I have not said clearly before, high CPU usage often makes my computer lose response, and there are no other special problems.
User and Workspace settings are all default and the same, open the configuration file only the following two settings:
{
"python.pythonPath": "C:/ProgramData/Anaconda3/python.exe",
"python.jediEnabled": false
}
If you need more details, feel free to let me know.
Thanks
Just checking up on this to see if you still observe this behavior on the latest build. If you do, you can use a (newish) option to disable this file watching:
"python.analysis.watchSearchPaths": false
In the latest build, this issue seems to have been solved. @jakebailey Thanks for you support!
Environment data
"python.jediEnabled"
set to; more info microsoft/vscode-python#3977): python.jediEnabled:falseExpected behaviour
CPU usage should not be so high.
Actual behaviour
CPU usage so high, the computer often crashes and cannot work properly.I have read a lot of questions, but I still haven't solved this problem. I hope you can help me to see it. This problem has been bothering me for two weeks.
Steps to reproduce:
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)