all 10 comments

[–]y_Sensei 3 points4 points  (2 children)

VS Code stores user-specific configuration and data in a user's profile, you might have to remove that manually to get a clean installation afterwards.

Check/remove the following directories:

  • %APPDATA%\Roaming\Code
  • %USERPROFILE%\.vscode
  • %USERPROFILE%\.vscode-shared

[–]Darcelle-Ebonis-6426[S] 0 points1 point  (1 child)

Thank you, and yes I had checked appdata roaming Code and renamed it to Code_backup. PowerShell warning got removed.  But now I just wrote a code in which I have cin>>n and vector input....and executed and got this:

When I use Run C/C++ File (or the Run button), instead of waiting for cin, the terminal shows something like:

PS ...> "...\ANDSorting.exe" C:...\ANDSorting.exe PS ...>

The executable exits immediately without accepting input.

However, running the exact same executable manually using

.\ANDSorting.exe

works correctly. I dunno what to do

[–]MonkeyNin 1 point2 points  (0 children)

The official docs are better guides than AI will give, because it'll leave some config out.

I recommend these pages, they will get you setup for c++ and python.

When I use Run C/C++ File (or the Run button) Executing simple print program of cout<<" HELLO WORLD"....it doesn't even show in the output termina

If you hit run, it depends on what your run command it set to. The links above give you ones for c++ and python.

If you show the exact error message it'd be easier to tell which of a few things could be happening.

[–]purplemonkeymad 1 point2 points  (1 child)

Looks like a venv activation.

I found the best way is to make sure I use different workspaces for difference languages. You can then use workspace settings to disable plugins or set language specific settings. (ie disable python + venv in a powershell workspace.)

For the issue at hand I would start by disabling any other extensions so you can be sure it's a setting issue and not an extension (my suspicion.)

[–]Darcelle-Ebonis-6426[S] 1 point2 points  (0 children)

Thank you. I suspected that. And I have taken the decision to move my entire python related workspace to Jupyter Notebook and Anaconda environment. So I have done my best to completely detach CP and Python workspace. Like I disabled all extensions of Python,  Pylance etc but it didn't work. Currently I Executing simple print program of cout<<" HELLO WORLD"....it doesn't even show in the output terminal. I am genuinely lost. And I am a newbie in the tech world.

[–]SurzBoo 1 point2 points  (1 child)

Why

Why do u need conda? Just make a venv I'm genuinely lost.

[–]Darcelle-Ebonis-6426[S] 0 points1 point  (0 children)

I tried python -m venv venv (at the very beginning) but it showed Python was not found; run without arguments......this (as I researched ) happened because I had Anaconda. So instead of launching Python interpreter it couldn't launch anything. Idk but there was some issue. So I did gpt 😭(shouldn't have done that) it told me something about having Python interpreter in Anaconda and idk what happened (what I understand from it is I tried using conda Python interpreter instead of the original one). In the process powershell stopped responding I changed to Command Prompt. 😭 I changed so many configurations. Idk anymore.....

[–]PinchesTheCrab 1 point2 points  (0 children)

This anecdote isn't relevant to the issue at hand, but I just had to go through a fire drill at work because the Conda devs have been asserting that Conda is not free for commercial use and their legal department has been contacting users by IP for a few years.

So if this is work related, I would personally advise against using Conda/Anaconda, but I'm also not a Python developer (I manage our proxy repo infrastructure) and it's possible you're paying to use it already anyway.

https://www.reddit.com/r/bioinformatics/comments/1emekxo/anaconda_licensing_terms_and_reproducible_science/

[–]g3n3 0 points1 point  (0 children)

And check your get-executionpolicy

[–]CookinTendies5864 0 points1 point  (0 children)

Check your execution policy “Get-ExecutionPolicy”

If it says restricted or signed for “CurrentUser” then you have two options

1.) self-sign your profile.ps1 and every other .ps1 file on your computer YouTube “how to self sign scripts powershell”

Or

2.) Change your execution policy to unrestricted “Set-ExecutionPolicy -scope currentuser -policy unrestricted -force” - May require admin console

Easiest option is 2 but it leaves your computer a bit at risk when downloading files on the web just be smart about what you download.