Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JetBrains Rider debugger not connecting #3

Open
Daniel15 opened this issue Jun 19, 2024 · 1 comment
Open

JetBrains Rider debugger not connecting #3

Daniel15 opened this issue Jun 19, 2024 · 1 comment

Comments

@Daniel15
Copy link

I'm using JetBrains Rider on Fedora. I created a new project using this template. It runs fine, but when I try to run with the debugger, the app never starts. Even if I put a breakpoint at the start of the first line of Main, it never gets hit.

The debugger works fine for a basic console app, and for an ASP .NET web app. It's just Gir.Core Gtk projects that I'm encountering this issue with.

Any ideas?

@Daniel15
Copy link
Author

Daniel15 commented Jun 19, 2024

It turns out this is something to do with PublishSingleFile. For now I've pulled that out into a PropertyGroup that only applies for release builds:

    <PropertyGroup>
        <OutputType>WinExe</OutputType>
        <TargetFramework>net8.0</TargetFramework>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
        <PublishTrimmed>false</PublishTrimmed>
        <SelfContained>true</SelfContained>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)' == 'Release'">
        <PublishSingleFile>true</PublishSingleFile>
    </PropertyGroup>

Edit: Turns out this is a long-standing bug in Rider: https://youtrack.jetbrains.com/issue/RIDER-56918/Cannot-start-debugging-net5-project-on-Linux-when-using-PublishSingleFile-in-.proj-file

It might be worth mentioning in the readme, in a comment in the csproj file, or just only using PublishSingleFile for release builds by default? (I'm not sure it has value in debug builds)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant