简体   繁体   中英

Cant run a code in vscode, instead of showing it to me in the terminal section, it sends me to the output section

I'm a noob in computer programming, today i installed vscode to learn python, everything was right, i run short and simple lines of code installed some extensions, but i dont know what happened, I'm not sure if i changed some configuration but when i try to run little lines of code (with the button) instead of running it and showing it to me in the "terminal section", it sends me to the "output" section and it just says that the code already run and its done.

在此处输入图像描述

Do somebody knows how to solve it please, it really makes me sad that i just ruined this program because its my first day and this already screw it. As you can see in the picture, i run the code and it shows off something different in the output section, i wrote that but later changed it. It seem like it runs the file but only when i save it. :(

You must save the file to get the new output everytime.

For running code in Terminal with the button - It looks like you are using Code Runner vscode extension. Which by default uses Output section to show output and cannot take input. You can change this behavior of that extension by pressing ctrl +, and going into vscode settings. Then just search code runner run in terminal You'll see an option to enable Run in Terminal feature turn that on. 图片参考

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