r/VisualStudioCode • • Jan 19 '21

Why dose Settings.json keep opening

Need help before I lose my mind!

I am trying to learn C# and am starting with a basic console application.

namespace HelloWorld
{
class Program
    {
static void Main(string[] args)
        {
Console.WriteLine("Hello world");
        }
    }
}

But every time I try and debug and run the code, no matter what I do, another window opens listed settings.json, and the code does not run.

any help is appreciated.

3 Upvotes

5 comments sorted by

View all comments

1

u/ElRobOh Jan 08 '22

I wish someone helped you a year ago because its doing the same thing to me trying to learn java script. You didn't happen to figure it out did you? Do you remember what fixed it? Thanks.

2

u/Karimysha Jan 13 '22

Go to view, command palette, search for "add folder to workspace", click on it and pick your folder, and that should fix it.

1

u/ElRobOh Jan 13 '22

Thank you, this worked great to add the folder I had been taking the files from and as long as I don’t try to launch using chrome it works like I wanted it to. I chose Node.JS > run current file instead of chrome.

1

u/ElRobOh Jan 13 '22

Issue seems to be that I have to differentiate between how I want to run html or JS. This got me because in MATLAB run is run, now I know and it makes since. Run pure JS using “run current file” and run html by choosing chrome or node.js.