I write and run my code in VScode but it shows nothing in the terminal.
Asked
Active
Viewed 480 times
-1

Kraigolas
- 5,121
- 3
- 12
- 37
-
3did you actually run the code? what did you do / type / enter to run it? – scotscotmcc Aug 17 '22 at 18:33
-
Welcome to Stack Overflow! Please take the [tour] and read [ask]. Please [edit] your question and clarify how you're trying to run the code, like @scotscotmcc is saying. – wjandrea Aug 17 '22 at 18:35
-
what happens when you run it? – AudioBaton Aug 17 '22 at 18:37
-
Have you looked at those other tabs in the bottom pane? OUTPUT seems a more likely place for your "hello world" than TERMINAL. – jasonharper Aug 17 '22 at 18:39
-
@jasonharper It depends how they're running it. If they're using "Start without Debugging" or Code Runner with "Run in Terminal" enabled, then Terminal is the right place. – wjandrea Aug 17 '22 at 18:40
-
what do you see next to `OPEN EDITORS` – rioV8 Aug 17 '22 at 19:08
2 Answers
0
You need to SAVE your code before you execute it. I see that your code is not saved. Save your code with this keyboard shortcut: Ctrl+S
Also, you do not have a file, your file name says "New Document...". You need to Go to File, open a folder, and inside a new project folder create your file. Now your program will run as expected!

wjandrea
- 28,235
- 9
- 60
- 81

Dennis Kozevnikoff
- 2,078
- 3
- 19
- 29
-
-
-
You can't save something that's not a file, so that's redundant, isn't it? – wjandrea Aug 17 '22 at 18:38
-
related: [Why don't other programs see the changes I made to a file in VS Code until I save those changes?](/q/76984829/11107541) – starball Aug 26 '23 at 22:22
0
- Make sure that you save the file.
- make sure you open the file in the folder you saved.
- When you add code or change your code, don't forget to save again
- Run your code.

Caroline Asteria
- 94
- 3