Debugging in Visual studio

Gabriel Vázquez (Dagger) edited this page Jul 13, 2018 · 14 revisions

First of all make sure that you've read the How to compile LMP chapter and be extra sure that you've adjusted the Scripts\SetDirectories.bat file

1- Make sure that the "Tools for Unity" is installed in your VS2017. You can do it by selecting the "Game development with Unity" node in the visual studio installer, also you can uncheck the "Unity XXXX 64-bit Editor" in the right panel to save some space

2- Copy KSP_x64_Dbg.exe from the folder LunaMultiPlayer\External\DebugLMP to your root KSP directory, next to the KSP.exe

3- Open a command prompt in that directory (shift + right click in the empty space of the explorer and select "open command window here".

  • Enter the command mklink /J KSP_x64_Dbg_Data KSP_x64_Data in the command window.
  • Check that you now have a KSP_x64_Dbg_Data folder that points to the stock KSP_x64_Data folder.

4- Put the PlayerConnectionConfigFile in the KSP_x64_Data directory (it makes the mono debugger starts its listening port)

5- Launch KSP with the KSP_x64_Dbg.exe

6- Attach to the correct unity instance using the "Debug->Attach to unity debugger" option from Visual Studio. If you don't know what instance you need to attach, check the status dialog or connection dialog as you will see there what debug port you should attach to.

Original link:

Version of unity for KSP 1.4.1: 2017.1.3p1 (


You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.