我在尝试在 Visual Studio Code 中调试用 .NET Core 编写的应用程序时遇到问题。这是设置:我使用的是运行 Debian 9(具有默认 GUI)的虚拟机。我已经安装了 .Net Core SDK 2.1 和 Visual Studio Code 1.30.0。安装了 C# 1.17.1 的扩展。我创建了一个简单的项目:
class MyProgram
{
static void Main(string[] args)
{
Console.WriteLine("Hello You Angel!");
ProcessStartInfo startInfo = new ProcessStartInfo() { FileName = "/bin/bash", Arguments = "-c nautilus /home/", };
Process proc = new Process() { StartInfo = startInfo, };
proc.Start();
}
}
Run Code Online (Sandbox Code Playgroud)
如果我运行该程序,则执行并生成正确的输出。在调试窗口中,我按下了齿轮按钮来编辑 launch.jason文件
这是它的样子:
{
"version": "0.2.1",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": …Run Code Online (Sandbox Code Playgroud)