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

[9.5] Cannot attach debugger to release build server #40

Open
MonzUn opened this issue Feb 17, 2022 · 12 comments
Open

[9.5] Cannot attach debugger to release build server #40

MonzUn opened this issue Feb 17, 2022 · 12 comments

Comments

@MonzUn
Copy link

MonzUn commented Feb 17, 2022

This is a modding specific bug/issue so I figured it should go here rather than the main EcoIssues tracker.

If you attempt to attach a debugger using Visual Studio to a server downloaded from Play.Eco, it gives the following error

"Unable to attach to CoreCLR. A debug component is not installed.

This started happening with 9.4 (maybe 9.3?) and is quite an issue for anyone who doesn't have dev tier and therefore can't build a server that will accept a debugger.

Both me and Nid encountered this issue and I've had it reported by other modders trying to extend DiscordLink now as well.

The way we do our setups is to set the eco server exe file as the target file to run hitting Run in Visual Studio in our plugin library projects.

@thetestgame
Copy link
Contributor

I remember this. I've been unable to reproduce it locally thus far. Attaching to a release server works when I try it. I'd need to know more details.

@MonzUn
Copy link
Author

MonzUn commented Feb 18, 2022

My guess is that you have something in your development environment that fixes it. I know it can be hard to get a clean test environment for reproducing these kind of things ^^'
I'll get back to you with a premade setup for DiscordLink so that it's quick and easy for you to test.

To me, it seems like any DLL project that runs the server exe and tries to attach a debugger will fail, if it's a release build of the server and it has been packaged for release via your build script. A regular local release build does not trigger the issue so I'm guessing something that's required for debugging gets stripped when you run your build script.

@JulianMa
Copy link
Contributor

JulianMa commented May 1, 2022

Same exact Issue here.
I can't attach the debugger to the EcoServer.exe.

On my Machine, this will occur every time, i try to attach.
This can be reproduced by:

  1. Clean Visual Studio 22/ Visual Studio 19 Installation
  2. Create an empty Project
  3. Start EcoServer.exe
  4. Debug -> Attach to Process -> EcoServer.exe
  5. "Unable to attach the process. A debug component is not installed.

The error seen in the image below is slightly different from @MonzUn, however i'am getting the exact same error he does, when launching the Server via debug Configuration:

(launchSettings.json)

{
  "profiles": {
    "TitleModDebug": {
      "commandName": "Executable",
      "executablePath": "C:\\eco\\mods\\Eco\\Server\\EcoServer.exe",
      "workingDirectory": "C:\\eco\\mods\\TitleMod\\TitleMod\\bin\\Debug\\net5.0"
    }
  }
}

Version: 0.9.5.0-beta (https://play.eco/s3/release/EcoServerPC_v0.9.5.0-beta.zip)
EcoServerPC_v0.9.5.0-beta.zip (SHA256): bc809c38e313f53581bd08c0b04227e3cd92e2af2f0463590c2b51f56f88c65c

Hopefully we can fix this.

image

@redwyre
Copy link
Contributor

redwyre commented Jun 23, 2022

Have you guys tried with 9.6 develop/staging with .net 6?

@MonzUn
Copy link
Author

MonzUn commented Jun 26, 2022

I haven't, but I'll try it out when I start updating my mods for 9.6, probably in a week or two.

@JulianMa
Copy link
Contributor

I will retry in the next few days

@JulianMa
Copy link
Contributor

JulianMa commented Jul 6, 2022

I tested it again:
I can't attach to v0.9.5.4-beta, however it works without any problems in the current v0.9.6.0-beta-staging-2339 build.
So i think we can close this one.

@redwyre
Copy link
Contributor

redwyre commented Jul 6, 2022

excellent, closing

@redwyre redwyre closed this as completed Jul 6, 2022
@MonzUn
Copy link
Author

MonzUn commented Sep 11, 2022

@redwyre This issue is back in the release version of 9.6. Can we reopen?
@JulianMa ran into it again and here's someone else in your Discord having the same issue.
https://discord.com/channels/254025510651297802/273246138835009548/1018300049022779462

@redwyre redwyre reopened this Sep 14, 2022
@MonzUn
Copy link
Author

MonzUn commented Jan 6, 2023

This issue is still present in 9.7.6.
I used a fresh dev environment on a laptop that just had the OS installed today, so there shouldn't be any pollution in the environment.

image

@V0rag
Copy link

V0rag commented Feb 12, 2023

Tested under 9.7.8, error still present. Quite bothersome, modding without debugging isnt very convenient.

@MonzUn
Copy link
Author

MonzUn commented Dec 28, 2023

Tested in Eco 10 in a fresh environment.
Issue is still present.

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

5 participants