Important Dummies Guide to Advanced Debugging
#1
How to create advancedsettings.xml Debug Log

This is an advanced method primarily used when KODI crashes during startup and prevents you from enabling Debug mode in Settings>System Settings>Logging. If this is not your situation then you will find it easier to follow the instructions in the next post of this thread.

1. Why do I need to do this
You have asked for assistance on the Kodi Forum, most likely because you are unable to start Kodi. This is a guide to set Debugging to ON by either modifying or creating a file named advancedsettings.xml
This guide is applicable to Kodi installations being run under Microsoft Windows.

2. Where do I find advancedsettings.xml
If you downloaded Kodi from this site and manually ran the installer, you will find it here...
C:\Users\Your User Name\AppData\Roaming\Kodi\userdata

If you downloaded Kodi from the Microsoft Store, you will find it here...
C:\Users\Your User Name\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\userdata

3. Once you have located the file, perform the following...
  1. Right-click the file and select Edit
  2. Insert the following code into the file by copying and pasting. Do not duplicate the <advancedsettings> tags if they already exist.
    cpp:
    <advancedsettings>
       <loglevel>2</loglevel>
    </advancedsettings>
  3. Save the file and close

4. Wait, I can't find the file
Ok, you will need to create the advancedsettings.xml file by following these simple steps.
  1. Ensure you are still in the directory described in Section 2 above
  2. Right-click on a blank area in the directory
  3. Select New, then select Text Document
  4. When Notepad opens with a blank page, copy the code as described in Section 3 above
  5. Save the file as advancedsettings.xml
  6. Close the file
  7. Check the extension of the file. It MUST BE .xml Ensure it is not something like .xml.txt or .xml.doc.
If you cannot see the extension then...
  1. click the start button and type File Extensions
  2. Select Show or Hide File Extensions
  3. Enable Show hidden files, folders and drives
  4. Remove the tick from Hide extensions for known file types
  5. Press Ok

5. Now What?
Try starting Kodi. It should still fail to start. Hopefully, though, it has recorded why it has failed to start in a file named Kodi.log. Once you upload the results, a helpful member of the community may be able to assist you.

6. Upload the results
The log file is named kodi.log and it is located in the Kodi directory described in Section 2 above. It is one level above the \userdata directory in which you modified the advancedsettings.xml file
You must locate this log file and copy it's contents to a pastebin type site as follows:
  1. Navigate to the \kodi directory as described in Section 2 above, and locate the file named kodi.log
  2. Open the file with Notepad and copy all the contents of the document
  3. Locate a Pastebin type site. Two examples are https://paste.kodi.tv/ or https://paste.ubuntu.com/
  4. Paste the contents of the kodi.log file (See Post#4 below for guide on posting debug logs)
  5. Submit the log. The submit button will be named something like Paste or Generate or Create New Paste. Some sites require a "poster" or "title" entry, so ensure all fields are completed.
  6. When the screen refreshes with your paste, copy the entire address in the address bar and paste it into a new message in your thread

7. What now?
Hopefully a helpful community member or Kodi team-member will review your log file and provide suggestions to rectify the problem.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
#2
How to create a Debug Log- The Basic/Easy Way

This is the easy/basic method primarily used when KODI is functional or functional enough to follow the below steps before experiencing any crashing.

  1. Enable Debugging mode.
    a. Go to Settings>System Settings>Logging and it should be the first option or
    b. press ctrl-shift-d on a keyboard
  2. Restart Kodi. Do not skip this step or you may be asked to do it again.
  3. Replicate the problem. Now that debug mode is enabled, repeat the steps that cause the problem.
  4. Upload the log using either the:
    a. Manual method to Kodi Paste Site. Log location is detailed here... Log_file/Advanced#Location (wiki) (see next section for more details), or
    b. Add-on method using the Kodi Logfile Uploader. (wiki) See note in the next post.
    With either method post the address link into a new post in your thread.

Note: If you logs are rejected for being too large then use... https://paste.ubuntu.com/
Note: Be aware of the difference between Kodi.log and Kodi.old.log. See the next post.


If you are Uploading using method 4a, the following are further instructions on locating your log file and how to upload it to a pastebin site...

The log file is named kodi.log. Its location varies depending upon your operating system. Find the correct location here... Log_file/Advanced#Location (wiki). You must locate this log file and copy it's contents to a public pastebin type site as follows:
  1. Exit\Shutdown Kodi
  2. Navigate to the log file folder described above and locate the file named kodi.log
  3. Open the file with Notepad and copy all the contents of the document
  4. Go to the Kodi Paste Site
  5. Paste the contents of the kodi.log file
  6. Press the floppy disk icon in the top right corner to save the paste and wait.
  7. When the screen refreshes with your paste, copy the entire address in the address bar and paste it into a new message in your thread

Note: Full logs only. No partial or redacted logs
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
#3
kodi.log -v- kodi.old.log

The Debug Logs are Session Logs.

The logs are written from Kodi startup to Kodi shutdown (or crash). The next time you start Kodi, the kodi.log is cleared, and a new kodi.log is created. The kodi.log that was there is renamed to kodi.old.log and the existing kodi.old.log is deleted. In effect you only ever have two logs available- the current one, and the previous one.

Be aware which log you are uploading. If you replicated the problem...
  1. but you will be restarting Kodi for whatever reason, you need to upload kodi.old.log
  2. After shutting down Kodi, but before restarting, you need to upload kodi.log

Note for Kodi Logfile Uploader (wiki) users:
The ability to upload the kodi.old.log file is disabled by default in the add-on. From the settings page of the add-on, enable this function. Once enabled, the kodi.log file will be uploaded first, you will then be asked if you want to upload kodi.old.log. Answer yes and take note of the address.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
#4
Using a Paste Service

If you are unfamiliar with using a paste service, the image below describes how to use Kodi Paste Site. Other paste services work in a similar manner, but their layout will be different.

Image
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
#5
Reserved2
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)

Logout Mark Read Team Forum Stats Members Help
Dummies Guide to Advanced Debugging0