Here you will find instructions on how to debug the MediaPortal code or your own plugin code you wrote for MediaPortal. This guide covers Microsoft Visual Studio only.
Make sure you read the guide about compiling MediaPortal. It covers everything to run MediaPortal in release configuration and all prerequisites listed their also for for this guide.
Open up MediaPortal.sln in Visual Studio, right click on the included C# project "MediaPortal" and chose "Set as StartUp Project". Now set the solution configuration to "Debug" and run the solution with the green "Play" symbol or hit F5 on your keyboard.
On the first startup of your new debug build you are asked to follow the configuration wizard. Please do so, it will set up all basic functions. To change settings afterwards you can simply run "configuration.exe" in the "MediaPortal\MediaPortal.Application\bin\Debug" folder. Be sure not to run it from the release folder, it will just change the settings for the release build!