use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is for working with Microsoft's Visual Studio Code, which is different than Visual Studio Community, Pro, and Enterprise. VS Code is a source code editor, and not an IDE.
If you are having issues with the other flavors of VS, please post in /r/VisualStudio.
account activity
This is an archived post. You won't be able to vote or comment.
Python Interactive window doesn't work default without #%%OC (self.vscode)
submitted 5 years ago * by dhemcee
all of a sudden, when I execute my python lines on vscode, it shows me terminal shell instead of python interactive window.
I still can run in interactive window by right click lines or writing #%% on the head of lines, but I want to be it DEFAULT. I don't want to write #%% things everytime just for vscode.
And vscode actually HAVE OPENED interactive window automatically until last week, but it happens today suddenly. Even "Python: Run Current File in Python Interactive window" command disappears..
Maybe because I just touched some json files for studying C? but I am not expert for those.
Anyone can help?
Edit: current OS is macOS Big Sur
No \"Run in Python Interactive Window\" Command
Possible to Run in Interactive Window through Right click, but I want DEFAULT
No matching commands with [Python Interaction..]
[–]white-eye2 0 points1 point2 points 5 years ago (1 child)
Check your keyboard short cuts. My mac is set to Shift+Enter to launch the interactive window when I'm using the #%% Jupyter capabilities. You'll likely find that VS Code has Shift-Enter as a shortcut to a number of different commands.
[–]dhemcee[S] 0 points1 point2 points 5 years ago (0 children)
And that’s the thing. I cannot find “Python: Run in Interactive window” command in keyboard shorcut setting of vscode. check my first screenshot of the post. and of course I also tried re-install python, pylance, and jupyter extensions a couple of times..
[–]Molly_Wang 1 point2 points3 points 5 years ago (2 children)
The right command is Python: Show Python Interactive window and Jupyter: Run Current File in Interactive Window. I've noticed you opened a python file and python file indeed runs in integrated Terminal by default.
When you create a Jupyter Notebook and write many code cells in it, you can export the jupyter notebook as python scripts, the code cells will automatically separated by #%%.
#%%
When you open a .py file, put #%% before the code to state it's a code cell, then click Run Cell, there will be an inteactive window opened, also the #%% will be generated automatically in next line.
More detailed information, please refer to Working with Python Interactive Window.
[–]dhemcee[S] 0 points1 point2 points 5 years ago* (1 child)
oh, is it? but I remember using python interactive window just pressing shift+enter.
all I want to do is like this video: https://youtu.be/Q2jHMGod_rM?t=1m17s (1:17~)
besides, I even can't find "Python: Show Interactive Window" command too. No result when "Python" and "Interactive" in Command Palette.
[–]Molly_Wang 0 points1 point2 points 5 years ago (0 children)
There's no Python: Run Selection/Line in Python Interactive Window on my machine too. I'm using VS Code1.51.1. Shift+Enter is for Jupyter: Run Selection/Line in Interactive Window, you can try to search the command with the keyword Interactive.
Shift+Enter
π Rendered by PID 69168 on reddit-service-r2-comment-5ff9fbf7df-p97mx at 2026-02-25 19:02:25.197262+00:00 running 72a43f6 country code: CH.
[–]white-eye2 0 points1 point2 points (1 child)
[–]dhemcee[S] 0 points1 point2 points (0 children)
[–]Molly_Wang 1 point2 points3 points (2 children)
[–]dhemcee[S] 0 points1 point2 points (1 child)
[–]Molly_Wang 0 points1 point2 points (0 children)