[英]Visual Studio Python Shell
Quick question. 快速提问。 I'm scratching my head as to why the latest version of visual studio offers tabs with interactive python terminals.
我为最新版本的Visual Studio提供带有交互式python终端的选项卡而scratch之以鼻。 As well as debugging terminals all built into the tabs that can be snapped.
除调试终端外,所有这些终端都内置在可以捕捉的选项卡中。 But when I attach & test run something it just opens a normal python terminal in CMD rendering the built terminals in VS useless.
但是,当我附加并运行测试时,它只是在CMD中打开一个普通的python终端,从而使VS中的内置终端无效。 I'm just thinking why lol.
我只是在想为什么大声笑。 They never get used.
他们从不习惯。 Is there a way to test run script in the built-in interactive terminals instead of it opening a Python shell?
有没有一种方法可以在内置的交互式终端中测试运行脚本,而不是打开Python Shell?
You can learn more about this feature here , it's just another repl with the convenience of being within Visual Studio. 您可以在此处了解有关此功能的更多信息,这只是使用Visual Studio的便利而已。 There's also some interesting connections to the editor that you can send selected code lines to the interactive window.
与编辑器之间还有一些有趣的联系,您可以将选定的代码行发送到交互式窗口。 I'm not sure how variable scoping works between the two but sometimes you just want to experiment in the repl before integrating it into a working python file.
我不确定两者之间的变量作用域如何工作,但有时您只想在repl中进行实验,然后再将其集成到有效的python文件中。
I mostly put the Immediate Window
to use for some interactive exploratory coding when I develop in Visual Studio. 在Visual Studio中进行开发时,我主要将“
Immediate Window
用于一些交互式的探索性编码。 This is scoped to where the current breakpoint is set which is good for manipulating things on the fly and getting feedback about my variables and what not. 这是在设置当前断点的范围内进行的,这非常适合即时操作并获取有关我的变量和不变量的反馈。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.