muhammadsammy / free-vscode-csharp

Free/Libre fork of the official C# extension for vscode
https://open-vsx.org/extension/muhammad-sammy/csharp
Other
110 stars 10 forks source link

App Exits at Debug.Writeline #73

Open YogiCoder8888 opened 1 month ago

YogiCoder8888 commented 1 month ago

I have a .Net 8 Console App and when the debugger executes Debug.Writeline("...") the App exits with no errors or exception thrown. I am using VS Codium on Windows 11.

To reproduce the problem create a Console App with:

dotnet new console

The code in Program.cs is simple:

using System.Diagnostics;

Debug.WriteLine("Debug World"); // App exits here
Console.WriteLine("Hello, World!");

Launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${workspaceFolder}/bin/Debug/net8.0/Console7.dll",
            "args": [],
            "cwd": "${workspaceFolder}",
            "console": "internalConsole",
            "stopAtEntry": false
        },
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach"
        }
    ]
}

tasks.json

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "command": "dotnet",
            "type": "process",
            "args": [
                "build",
                "${workspaceFolder}/Console7.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary;ForceNoAlign"
            ],
            "problemMatcher": "$msCompile"
        },
        {
            "label": "publish",
            "command": "dotnet",
            "type": "process",
            "args": [
                "publish",
                "${workspaceFolder}/Console7.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary;ForceNoAlign"
            ],
            "problemMatcher": "$msCompile"
        },
        {
            "label": "watch",
            "command": "dotnet",
            "type": "process",
            "args": [
                "watch",
                "run",
                "--project",
                "${workspaceFolder}/Console7.csproj"
            ],
            "problemMatcher": "$msCompile"
        }
    ]
}

Any help or pointers will be appreciated. Thank you!