[英]Does VS Code Have a Command Panel For Testing Short Chunk of Codes?
I'm new to VS Code.我是 VS Code 的新手。 I wonder if VS Code has any panel to test run chunk of codes instead of creating a new file?我想知道 VS Code 是否有任何面板来测试运行代码块而不是创建新文件? I'm so used to traditional Rstudio, PyCharm, Jupyter Notebook IDE that I could just test out short chunks of code in the output command panel.我已经习惯了传统的 Rstudio、PyCharm、Jupyter Notebook IDE,我只能在输出命令面板中测试一小段代码。 However, it seems VS Code command output is just the terminal, which does not read my python code for the test running small chunks of code.但是,似乎 VS Code 命令输出只是终端,它不会读取我的 python 代码来运行小块代码的测试。 Any suggestion on how to solve this?关于如何解决这个问题的任何建议?
Thanks, Lily谢谢,莉莉
yes it does.是的,它确实。 vs code is such a great lightweight IDE. vs code 是一个非常棒的轻量级 IDE。 https://code.visualstudio.com/docs/editor/debugging https://code.visualstudio.com/docs/editor/debugging
You can make breakpoints or Logpoints and decide which part of the code you want to debug.您可以创建断点或日志点并决定要调试的代码部分。
I think what you are looking for is jupyter notebook extension for vscode.我认为您正在寻找的是 vscode 的 jupyter notebook 扩展。 This is good guide to help you get started这是帮助您入门的好指南
You can create a jupyter notebook in the VSCode:你可以在 VSCode 中创建一个 jupyter notebook:
Or you can select Run Selection/Line in Interactive Window
or Run Selection/Line in Python Terminal
:或者您可以选择Run Selection/Line in Interactive Window
Run Selection/Line in Python Terminal
或Run Selection/Line in Python Terminal
:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.