-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
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
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:
- NA
Logs
Output for Python
in the Output
panel (View
→Output
, 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