简体   繁体   中英

Does VS Code Have a Command Panel For Testing Short Chunk of Codes?

I'm new to VS Code. I wonder if VS Code has any panel to test run chunk of codes instead of creating a new file? 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. 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. Any suggestion on how to solve this?

Thanks, Lily

yes it does. vs code is such a great lightweight IDE. 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. This is good guide to help you get started

You can create a jupyter notebook in the VSCode:

在此处输入图片说明

Or you can select Run Selection/Line in Interactive Window or Run Selection/Line in Python Terminal :

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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