Jump to content

Question: How fo I debug my mod


Recommended Posts

How do I step through my code at run time within the game. Currently I have no way to debug my code?

I just have a checkbox that displays a different string based on the state of the program and lots of print() everywhere, it's not optimal but it's quick and it does the job.

Link to comment
Share on other sites

How do I step through my code at run time within the game. Currently I have no way to debug my code?

Sarbian figured something out a short time ago, but the update broke it afaik.

In general: you can't attach a debugger but have to use a lot of Debug.Print, it's terrible.

Link to comment
Share on other sites

How do I step through my code at run time within the game. Currently I have no way to debug my code?

This is one of those many cases where stepping through code line by line is not always an option. It's not just with KSP, but with a lot of code projects.

In the case of KSP, I usually use the built in logging functions to help debug code. The KSP.log file, in this case, is your best friend.

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...