Home > Software engineering >  vscode python interactive mode variable explorer slow and inaccurate
vscode python interactive mode variable explorer slow and inaccurate

Time:08-19

I'm trying to switch from Spyder to VScode in order to integrate git into my workflow. However I'm running into some (I think related?) issues that I'd love some help with.

  1. Interactive mode and the variable explorer can take up to 20 seconds to define a=5
  2. the variable explorer really struggles to show me a dataframe with more than 100k rows.
  3. the variable explorer can't open pandas index objects
  4. the variable explorer does not show the data as its stored, example: my EAN18 code's had their last 2 digits transformed into a 0. It took me 3 hours to figure out that was what's happening.

info: I'm using a conda environment

  • python 3.9.12
  • vscode 1.70
    • vscode python plugin v2022.12.1

I told VSCode to use my anaconda environment through: ctrl shift p --> python: select interpreter --> choosing my anaconda environment from the list

I cannot imagine anyone getting anything done with issues like these, so I must be doing something wrong. What could be a good place to start troubleshooting one or multiple of my issues?

CodePudding user response:

It's definitly not usual, that there are these delays. Although it is quite hard to tell what the problem is, because there are two many "variables" at play (Your PC-Setup, installed Software, ...).

But there are some things you could try as a solution.

  1. Make sure you use the 64 Bit Version of VS Code. (If you accidently downloaded the 32-BIT Version that would explain the slowness).
  2. Try to use a regular python enviroment (not using conda). Maybe it has something to do with the many modules which come pre-installed with conda.

These are the things you could try to fix your VS-Code setup.

On a further note, on personal experience I'd recommand using the PyCharm IDE. It is entirly free too (the community version at least) and has an even better GIT integration compared to the VS-Code's one.

If you can't fix your mentioned issues this might be a good option to choose as an alternative.

Hope this helps :)

CodePudding user response:

This does not seem to be a common problem.

I can give some suggestion:

  1. Add the following code to your setting.json:

    "search.followSymlinks": false,

  2. Set high performance mode for vscode in graphics card settings

  3. Power settings enable high performance

  • Related