LCheng
LCheng

Reputation: 400

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

Upvotes: 0

Views: 756

Answers (3)

Steven-MSFT
Steven-MSFT

Reputation: 8411

You can create a jupyter notebook in the VSCode:

enter image description here

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

enter image description here

Upvotes: 1

Seun S. Lawal
Seun S. Lawal

Reputation: 551

I think what you are looking for is jupyter notebook extension for vscode. This is good guide to help you get started

Upvotes: 1

jeff pentagon
jeff pentagon

Reputation: 856

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.

Upvotes: 1

Related Questions