Debugging in Visual Studio

First of all 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 1- Copy KSP_x64_Dbg.exe from the folder "LunaMultiPlayer\External\DebugLMP" to your KSP directory (example: D:\Steam\SteamApps\common\Kerbal Space Program\) 2- Open a command prompt in that directory (shift right clic in the empty space of the explorer and select "open command window here". In it enter the command "mklink /J KSP_x64_Dbg_Data KSP_x64_Data". You will now have a KSP_x64_Dbg_Data that points to the stock KSP_x64_Data. 3- Put the PlayerConnectionConfigFile in the KSP_x64_Data directory (it makes the mono debugger starts its listening port) 4- Launch KSP with the KSP_x64_Dbg.exe 5- 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.