How I debug and run single cs files in vscode (WIP)


CSharp VSCode

With Java extension, we can easily run and debug a single .java file.

Example for .java file in vscode However, we can't do this with C#; we have to create a project, and set up debug for the Main method.

However again, this doesn’t mean we can set up a workflow for C# single files for things like leetcode, other program tasks, or small scripts.

We can use refelction. (Yes, refelction again.)

Create a normal .net project and setup debug for vscode.

(WIP)