question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run Line in Python interactive window does not work

See original GitHub issue

Environment data

  • VS Code version: 1.31.1
  • Extension version (available under the Extensions sidebar): Python (2019.2.5433)
  • OS and version: macOS Mojave 10.14.2
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.5 (pyenv)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): pyenv
  • Relevant/affected Python packages and their versions: -

Expected behaviour

Run Line in Python interactive window using keyboard shortcut (Shift+Enter).

Actual behaviour

Line is not executed, cursor goes to line below. The same command works by using the drop-down menu option with the same name and keyboard shortcut.

Steps to reproduce:

  1. Press Shift+Enter in a python script with launched Python interactive window.

Logs

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

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rchiodocommented, Mar 7, 2019

No you should enter a new feature request. We may change the behavior based on how many people up vote it or not.

1reaction
rchiodocommented, Mar 6, 2019

This should be fixed in the latest release: 2019.2.5558

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code "Run selection/line in Python interactive window" not ...
It will: - Send a single line of code to the interactive window using either shift+enter or right-click and select, when the cursor...
Read more >
Run Line in Python interactive window does not work #3572
Run Line in Python interactive window using keyboard shortcut (Shift+Enter). Actual behaviour. Line is not executed, cursor goes to line below.
Read more >
VS Code: Shift+Enter does not send code to Python Interactive
If you go to the Settings( Ctrl + , ) you can see the search bar. There, put in 'Send Selection To Interactive...
Read more >
Python in Visual Studio tutorial step 3, interactive REPL
Using Ctrl+Enter in the editor without a selection runs the current line of code in the Interactive window and automatically places the caret...
Read more >
Python Interactive window doesn't work default without - Reddit
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 ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found