#Visual Studio code does not work

119 messages · Page 1 of 1 (latest)

glacial hill
#

I use visual studio to program an since wendsday is not working.
It says it compiled the program but is not printing anything.

Ex.
I do the basic hello world but wen i run the code it does not print hello world, but says it has compiled. How can i fix this problem

woven quail
glacial hill
rancid treeBOT
#

@glacial hill has reached level 3. GG!

woven quail
#

That's vscode, not vs

glacial hill
#

so whats the vs?

glacial hill
craggy wind
# glacial hill so whats the vs?

Visual studio is found when you search on google for Visual Studio Without the "code" at the end. Then you should be redirected to a page where you can download the windows executable

glacial hill
#

oww i forgot to specify

craggy wind
#

If you want to do c++ in visual studio code

#

Then follow this guide for your specific operating system.

glacial hill
#

im using visual studio code

#

i have it installed

craggy wind
#

Are you running the code from the run button in your code editor?

glacial hill
#

yes

craggy wind
#

Try to compile and run the code manually in terminal.

glacial hill
#

how

craggy wind
# craggy wind

Or try to follow the instructions in the guide I showed here:;

craggy wind
#

Then run the executable generated by doing .\HelloWorld.exe

glacial hill
#

sorry if im slow to understand

craggy wind
#

That's fine

glacial hill
craggy wind
rancid treeBOT
#

@craggy wind has reached level 2. GG!

glacial hill
#

i think im doing something wrong

#

Visual Studio code does not work

craggy wind
#

If you are unsure you can send a screenshot so I can see what you are seeing.

glacial hill
#

should i show you the error

craggy wind
#

Yeah

glacial hill
#

the program should work

craggy wind
# glacial hill the program should work

Yes it should, please follow these instructions for setting up cpp to run in visual studio code and after completing please try to use the run button again.

glacial hill
#

The funny thing is that i was programing up to wensday and VSc was working fine

glacial hill
craggy wind
#

That's fine, when you are done, you can try to open a new terminal outside of visual studio code and then navigate to the folder where your project file HelloWorld.cpp is (with cd) and run the following command to compile the program: g++ -o HelloWorld HelloWorld.cpp

glacial hill
#

When you say outside what are you refering to ?

craggy wind
#

Outside as in not the integrated terminal that you can use in visual studio code but the one when you press windows + r and type cmd

glacial hill
#

Okok

glacial hill
#

Hello

glacial hill
#

It was working

#

And in the middle of a new program it stop working

woven quail
glacial hill
woven quail
#

Yeah that's probably related to "Code Runner"

glacial hill
#

what should i do?

rancid treeBOT
#

@glacial hill has reached level 4. GG!

woven quail
#

What do you need the extension for?

glacial hill
#

im actually not sure about the Code Runner one because someone added it afther VSc stop working for me. it work for like 30m and the problem was back

woven quail
#

Also, whats C/C++ Compile Run?

#

Just stick to one process of compiling and running your application rather than using three different extensions

glacial hill
woven quail
#

Oh, your professor is telling you to use vscode? dogeunhappy

#

I've never worked with C/C++ Compile Run nor Code Runner though both could be related to the exception

woven quail
glacial hill
#

and i was using it until wensday al lunch that it stoped working

woven quail
glacial hill
#

wile i was using it

woven quail
#

But there shouldn't be a issue there

craggy wind
#

I mean couldn't he try to remove the module PSReadLine and see if it fixes it? and just reinsatll it if it doesn't. From what I understand it's for maintaining terminal commands history

woven quail
#

Remove PSReadLine from where? He could try to remove the two third party extensions

#

@glacial hill I would try to use cmd instead of powershell in your vscode terminal

#

I guess there is a setting for that somewhere

#

From integratedterminal to internalconsole

#

So that you don't rely on PSReadLine anymore

craggy wind
#

You can remove a module temporarily by using Remove-Module PSReadLine, but using cmd instead would probably also fix it.

glacial hill
#

i uninstall the VSc something user and installed it again

#

and its working for know

woven quail
#

vsc something user?

#

What's that

glacial hill
#

i said something because i dont remember

#

but thanks

#

;-;

#

it didnt last

glacial hill
woven quail
glacial hill
#

i did noticed that but i dont know why

#

it stop working

#

again

woven quail
glacial hill
woven quail
#

Do you have some sort of run configuration?

glacial hill
#

i dont know

#

;-;

woven quail
#

What's inside your .vscode folder

#

Make sure that "console": "internalConsole" is inside your launch.json

glacial hill
woven quail
# glacial hill here

If you go to the "Run and debug" tab (above the extension tab you are on) there should be something like "create launch.json file"

#

But I don't know how your other extensions behave

woven quail
#

Great

glacial hill
woven quail
#

Now it's probably trying to run from your launch.json which it didn't before

#

What's inside your launch.json now?

glacial hill
#

i dont know

#

sorry

#

is this important ?

#

because it was not installed

woven quail
#

You don't need all these third party stuff

#

Only microsofts extensions should be enough

glacial hill
#

so what sould i do

woven quail
#

Take a look in your launch.json

#

Being limited to vscode makes things more difficult than they actually are lol

glacial hill
woven quail
#

Yeah, you'll have to adjust that

glacial hill
#

what to be exact ?

rancid treeBOT
#

@glacial hill has reached level 5. GG!

woven quail
#

You want to use G++, right?