Minecraft versions 1.7 and above are able to output advanced debug information to the users' Development Console logs.
These debug logs can track packets being sent to and from servers, server connecting, authenticating logs (no personal information is collected other than one's UUID and temporary hash tokens*), audio channel changes and entity information.
Then, make new profile at the Minecraft Launcher by pressing "New Profile", you can name it as you wish.
Save it, and from the drop down at the bottom right select the new profile you made and continue with these instructions.
Windows
Open notepad or any preferred plain text-editor and paste in the text you just copied.
If you press CTRL+S, you should be prompted with a Windows save prompt, name the file (with quotes) "debugsettings.xml", then save this file in "%AppData%\.minecraft".
Mac OSX
Open TextEdit (search it at Spotlight) and make sure the text format is set to plain by going to "File" -> "Make plain text". Then paste in the text you copied from above.
Press Command+S and name the file "debugsettings.xml" and save this to your Desktop. Go to the Minecraft launcher, press "Edit Profile" -> "Open Game Dir" and a window should open. Then drag "debugsettings.xml" from your desktop into the window that opens.
Linux
Paste the text above into a text editor, and save it as "debugsettings.xml" in ~/.minecraft.
Configuring the launcher
After you've saved "debugsettings.xml" in your Minecraft directory, open the launcher and press "Edit Profile".
Check Game Dir** and copy everything in it. Then check "JVM Arguments" and input in:
-Dlog4j.configurationFile=
.
Then, at the end of what you put in JVM Arguments, paste in the "Game Dir" part you copied. Then, at the end of that, input in: /debugsettings.xml.
Next, set "Open Game Dir" to "Keep the launcher open" and hit "Save".
Then, run Minecraft and wait until you experience any issues. If you pay attention to the Development Console, you should see a list of debug entries.
If you were asked to follow these instructions to troubleshoot an issue, copy the entire Development Console through right clicking somewhere and pressing "Copy All Text". Go to a site like https://gist.github.com/ and submit the entire log by pressing "Create Secret Gist" then give whom is assisting you a link to the logs.
These debug logs can track packets being sent to and from servers, server connecting, authenticating logs (no personal information is collected other than one's UUID and temporary hash tokens*), audio channel changes and entity information.
Copy everything in the following spoiler:
Save it, and from the drop down at the bottom right select the new profile you made and continue with these instructions.
Open notepad or any preferred plain text-editor and paste in the text you just copied.
If you press CTRL+S, you should be prompted with a Windows save prompt, name the file (with quotes) "debugsettings.xml", then save this file in "%AppData%\.minecraft".
Open TextEdit (search it at Spotlight) and make sure the text format is set to plain by going to "File" -> "Make plain text". Then paste in the text you copied from above.
Press Command+S and name the file "debugsettings.xml" and save this to your Desktop. Go to the Minecraft launcher, press "Edit Profile" -> "Open Game Dir" and a window should open. Then drag "debugsettings.xml" from your desktop into the window that opens.
Paste the text above into a text editor, and save it as "debugsettings.xml" in ~/.minecraft.
After you've saved "debugsettings.xml" in your Minecraft directory, open the launcher and press "Edit Profile".
Check Game Dir** and copy everything in it. Then check "JVM Arguments" and input in: .
Then, at the end of what you put in JVM Arguments, paste in the "Game Dir" part you copied. Then, at the end of that, input in: /debugsettings.xml.
If on Windows, it should look like: .
If on OSX, it should look like: .
If on Linux, it should look like this: "user" is your actual computer's username.
Next, set "Open Game Dir" to "Keep the launcher open" and hit "Save".
Then, run Minecraft and wait until you experience any issues. If you pay attention to the Development Console, you should see a list of debug entries.
If you were asked to follow these instructions to troubleshoot an issue, copy the entire Development Console through right clicking somewhere and pressing "Copy All Text". Go to a site like https://gist.github.com/ and submit the entire log by pressing "Create Secret Gist" then give whom is assisting you a link to the logs.
* If you wish, you may omit anything in curly brackets after "Writing POST data to https://sessionserver.mojang.com/session/minecraft/join: {}".
** If you use a custom game directory, save debugsettings.xml in that directory.