This page will describe how to create, access and upload the Debug Logfile when Kodi is unresponsive or you are unable to navigate the menu system. If you can navigate the menu system, it is recommended you use the Easy Method.
The process requires the creation or editing of a file called advancedsettings.xml which is a simple .txt file with the extention changed to .xml. The file does not exist by default and must be created.
The file must be saved in the correct location as shown in the table below. If you already have an advancedsettings.xml file, then simply edit the file by inserting the appropriate entries into the file somewhere between the opening and closing <advancedsettings> tags, ensuring it does not interfere with existing tags.
|1. Location of the advancedsettings.xml file.|
- The advancedsettings.xml file is located as shown in the table below. You will either have an existing advancedsettings.xml file here, or you will need to create one and place it here.
Operating system File path Android Android/data/org.xbmc.kodi/files/.kodi/userdata/ (see note) iOS /private/var/mobile/Library/Preferences/Kodi/userdata/ LibreELEC/OpenELEC /storage/.kodi/userdata/ Linux ~/.kodi/userdata/ Mac /Users/<your_user_name>/Library/Application Support/Kodi/userdata/ (see note) Windows C:\Users\<your username>\AppData\Roaming\Kodi\userdata Windows UWP %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\
|2. Create and Edit the advancedsettings.xml file.|
- Create a blank text file either in the location specified above or in a more convenient location. Ensure it is plain text file, not a Word document for example. (Technical: save as UTF-8)
- Add the Debug Mode code specified in the next section. If you are unsure which code to use, then copy one of the two examples and paste it into the blank file. If you are editing an existing advancedsettings.xml file, do not duplicate the <advancedsettings> tags.
- If you have been asked to enable Component Logging for a particular component, then add the correct code as detailed in the below section Enable Component Logging.
- Save the file. Name/rename it advancedsettings.xml. Ensure the extension is .xml and not something like .xml.txt or similar.
- If you created the file in another location, now move the file to the correct location as specified in the table in the previous section.
|3. The Debug Mode code to add to the advancedsettings.xml file|
- A number of options exist to enable Debug Mode. Choose an option, or copy and paste one of the Examples if unsure.
Sets the logging level used to log errors and information. The "hide" attribute is optional.
|true||Hides the "enable debugging" setting in the Settings page. (default)|
|false||Allows "enable debugging" setting to switch between 0 and 2.|
|-1||No logging, suppresses all log output|
|0||Normal logging, only logging errors (default)|
|1||Debug logging with freemem, fps and cpu usage (no on screen)|
|2||Same as 1 (with on screen display)|
|3||Same as 2 + full smb logging (no on screen display)|
<advancedsettings> <loglevel>2</loglevel> </advancedsettings>
<advancedsettings> <loglevel hide="true">2</loglevel> </advancedsettings>
Note: The setting is persistent through shutdown and restarts.
Note: If debugging is enabled in the GUI, loglevel will be set to 2. This will over-ride the
advancedsettings.xml setting. You must disable the GUI Setting before adding the entry to
|4. The Component Logging code to add to the advancedsettings.xml file|
- Only add this if you have been specifically asked to add it.
- To enable Component Logging, copy the following code to the advancedsettings.xml file. Do not duplicate the <advancedsettings> tags.
- The first line enables the extra logging. Available options are true to enable and false to disable.
- The second line requires component values to be inserted. Replace the wording EnterValues with the required values. Multiple values are separated by a comma and no spaces. The available components and values are listed in the expandable table below.
<advancedsettings> <setting id="debug.extralogging">true</setting> <setting id="debug.setextraloglevel">EnterValues</setting> </advancedsettings>
|GUI name||<setextraloglevel> code|
|The SMB library||32|
|The libcURL library (HTTP(S), DAV)||64|
|The FFmpeg libraries||128|
|The Audio component||2048|
|The Video component||32768|
|audio/video timing information||262144|
|The Webserver component||65536|
|The Airtunes library||4096|
|The UPnP components||8192|
|The libCEC library||16384|
|The Database component||131072|
|5. It is important that you now replicate the problem. Do whatever you did previously when you experienced the problem.|
- For example...
- If Kodi fails to start, then try starting Kodi
- If Kodi crashes when you perform a particular action, then repeat the action to cause the crash
|6. The log must now be uploaded to a Pastebin type site using one of the following methods:|
- If you are using a desktop operating system, such as Windows, then you can simply navigate to the Debug Log using the File Manager of the operating system.
- Once you find the log...
- Open it with any text editor and copy the contents of the file.
- Paste the contents to a paste site like http://paste.kodi.tv/ or https://paste.ubuntu.com.
- Press the Save icon or Paste! depending on which site you are using.
- When the screen refreshes with your paste, copy the entire address in the address bar and paste it into a new message in your post.
- Logs are located in the following locations:
|Operating System||File/Folder Path|
|Windows store (UWP)||%LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\kodi.log|
|Special protocol||special://logpath (this can be used by scripts)|
3 Operating System Specific
General notes pertinent to the various operating systems.
If you are a Windows user and are struggling with this page, then see our step by step guide in the following link. Users of other operating systems can still use this guide, but will need to adapt some of the steps.
Generate a debug.log link automatically to post anywhere that requires a debug.log.
sudo apt install pastebinit -y pastebinit $HOME/.kodi/temp/kodi.log
- See also: Accessing Kodi via SSH
4 Technical Details
A brief description of the log contents.
Each event is logged to one line of the Kodi log file which is formatted as follows...
[TIMESTAMP] T:[THREADID] [LEVEL]: [MESSAGE]
- TIMESTAMP - The date and time at which the event occurred- yy:mm:dd hh:mm:ss.sss
- THREADID - The thread identification number in which the event occurred.
- LEVEL - The severity of the event. See below.
- MESSAGE - A brief description and/or important information about the event.
4.2 Severity Levels
How potentially damaging an event is. Listed in order from least to most severe...
- DEBUG - In depth information about the status of Kodi.
- INFO - Something has happened. It's not a problem, we just thought you might want to know. Fairly excessive output that most people won't care about.
- NOTICE - Similar to INFO but the average Joe might want to know about these events. This level and above are logged by default.
- WARNING - Something potentially bad has happened. If Kodi did something you didn't expect, this is probably why. Watch for errors to follow.
- ERROR - This event is bad. Something has failed. You likely noticed problems with the application be it skin artifacts, failure of playback a crash, etc.
- FATAL - We're screwed. Kodi is about to crash.
|Return to top|