Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Debugging in Visual studio
First of all make sure that you've read the How to compile LMP chapter and be extra sure that you've adjusted the
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_Datain 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.
Version of unity for KSP 1.4.1: 2017.1.3p1 (https://unity3d.com/es/unity/qa/patch-releases?version=2017.1)