简体   繁体   English

Visual Studio Code - 关于运行代码的问题

[英]Visual Studio Code - problem about running code

Im new and I started to learn python some time ago but today I have small problem about running code in Visual Studio Code.我是新手,前段时间我开始学习 python 但今天我遇到了关于在 Visual Studio Code 中运行代码的小问题。 When i try to run code then i got: enter image description here当我尝试运行代码时,我得到: enter image description here

Can you explane me why i got this?你能解释一下为什么我得到这个吗? And how can I fix it?我该如何解决?

I tried nothing and i just expect fast answer我什么都没试过,我只是期待快速的回答

First of all you are not running the code but debugging the code.首先,您不是在运行代码,而是在调试代码。 What you show in the picture is just some powershell commands to debug the code.您在图片中显示的只是一些用于调试代码的 powershell 命令。

Because vscode uses the system's built-in terminal (power shell or cmd), the execution command is displayed when you run or debug the code.因为vscode使用的是系统自带的终端(power shell或者cmd),所以在运行或者调试代码的时候会显示执行命令。 The advantage of this is that the code can be run without hassle anywhere.这样做的好处是代码可以在任何地方轻松运行。

在此处输入图像描述

If you don't want the terminal to display these commands, you can use the Code Runner to output the results in the OUTPUT panel.如果不希望终端显示这些命令,可以使用Code Runner output OUTPUT面板中的结果。

在此处输入图像描述

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

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