简体   繁体   English

VSCode Python Shift + Enter 仅发送到交互式 Window

[英]VSCode Python Shift + Enter Only Sends to Interactive Window

I've been trying to research this for a while, but can't find the answer.我一直在尝试研究这个问题,但找不到答案。 I'm using the keybinding shift+enter to send the line of code to the Terminal, but it only sends to the Python Interactive.我正在使用键绑定 shift+enter 将代码行发送到终端,但它只发送到 Python Interactive。 It looks like VSCode should be able to figure out out where it should send the code automatically, but the only way I can figure it out is to uncheck...看起来VSCode应该能够弄清楚它应该自动发送代码的位置,但我能弄清楚的唯一方法是取消选中......

Python > Data Science: Send Selection to Interactive Window

After doing this shift+enter would execute to the terminal.完成此 shift+enter 后将执行到终端。

I was curious if anyone has ran into this issue and fixed it without unchecking properties.我很好奇是否有人遇到过这个问题并在没有取消选中属性的情况下修复了它。

I'm a developer on this extension.我是这个扩展的开发者。 By default the setting should be sending shift-enter to the terminal.默认情况下,该设置应发送 shift-enter 到终端。 So Send Selection to Interactive Window is false by default.所以 Send Selection to Interactive Window 默认为 false。 We do have a popup that if you are executing a file with code cells in it (#%% markers) we prompt and ask if you want to send selection to the Interactive Window.我们确实有一个弹出窗口,如果您正在执行一个包含代码单元的文件(#%% 标记),我们会提示并询问您是否要将选择发送到 Interactive Window。 If your setting was turned on it might have been that you said yes to this popup or changed the setting a previous time.如果您的设置已打开,则可能是您对此弹出窗口说“是”或之前更改了设置。 Do you recall having changed the setting before?你还记得以前更改过设置吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM