Jump to content

Debugging Tips?


Interfect

Recommended Posts

So I have this strange issue where having a certain class defined (a MonoBehavior subclass copied out of HyperEdit) stops any of my plugin code from running. The plugin, however, builds just fine.

I assume KSP is encountering some sort of error loading the plugin? Where can I find the relevant error log, and what strings should I search it for to try to pin down this issue?

EDIT: I've narowed the problem down to something in here:


foreach (var part in vessel.parts.Where(part => part.Modules.OfType<LaunchClamp>().Any()).ToList())
part.Die();

When those two lines are in, my plugin doesn't load. When I take them out, it loads fine.

I suspect that something is going wrong with the Linq and the lambdas. Mods are allowed to use Linq, right? And lambdas? After all, I pulled this code from HyperEdit.

I'm building the code with SharpDevelop, if it matters (which it really shouldn't).

Any ideas what's up?

Edited by Interfect
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...