Skip to content

[Feature Request] Run chunks akin to PyCharm Scientific Mode #2514

@j9ac9k

Description

@j9ac9k

Environment data

  • VS Code version: 1.27.1
  • Extension version (available under the Extensions sidebar): 2018.8.0
  • OS and version: macOS 10.13.6
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda, pyenv 3.7 (any)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda virtualenv pyenv
  • Relevant/affected Python packages and their versions: any

Actual behavior

Code executes as it should

Expected Requested behavior

PyCharm a year ago unveiled a "Scientific mode" feature, which I think visual studio would benefit from having a feature similar to it. It allows for developers to easily mark chunks of code to execute and then to interact with the live interpreter.

Here is a screenshot of an example from within PyCharm

screen shot 2018-09-06 at 3 47 24 pm

By adding #%% the user initiates effectively a breakline, where they can run a chunk of code.

The use case here is primarily for pandas, or numpy operations where you need to test out that you're calling the right arguments, or have the right method chaining, which takes a little while to get working right. Often complicated merge operations can take multiple iterations to work as intended. Having the IPython interpreter active on the bottom also makes it easy to query various objects to see what their shape/values are.

It would be great is visual studio code had a feature similar to this.

Steps to reproduce:

  1. NA

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

NA

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

NA

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-debuggingfeature-requestRequest for new features or functionalityinfo-neededIssue requires more information from poster

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions