Use this route only for an inaccessible interface
If Kodi starts normally and its settings are usable, its GUI debug-log procedure is the simpler documented route. The advanced method is relevant when Kodi is unresponsive or cannot reach the menu. Begin by recording the exact startup symptom and installed platform before editing files.
Keep a copy of the existing configuration and identify a way to restore it outside Kodi. A failed startup is not a reason to replace the whole data directory with a file found online. The task is to obtain useful evidence from one reproducible attempt while preserving the current setup.
Locate the actual userdata directory
Kodi’s advanced-log guide places advancedsettings.xml in the platform’s userdata location. It requires plain UTF-8 text and the correct .xml filename. Consult the table for the actual installation type, including packaged or portable builds, rather than using a desktop path from a different system.
Check whether the file already exists. Preserve it before editing and keep its current structure. The guide explicitly says not to duplicate the outer advancedsettings tags. A filename silently ending in .xml.txt or a document saved in a word-processor format will not be the same configuration file.
Add only the documented logging entry
Use the current guide’s minimal debug-mode example or the exact component request supplied by legitimate support. Component logging has a narrower purpose and should not be added as an unexplained collection of values. Keep the original file and the small intended change distinguishable.
Then reproduce one startup attempt or the shortest failing action. Record its time and outcome. Advanced logging persists across restarts, so retain a plan to remove the temporary entry after evidence is captured. Do not make unrelated decoder, database or network edits during that same attempt.
Retrieve, review and restore the ordinary state
Copy the relevant session log using the platform’s supported file access and inspect that it contains the intended attempt. Preserve a private original and review any sharing copy for credentials, source addresses and personal details. A startup log can still contain sensitive configuration context.
After capture, restore the prior configuration or remove only the temporary logging change through the documented route. Keep the captured file with the reproduction and version information. The expected outcome is usable diagnostic evidence; this guide does not claim the startup fault has been repaired or that every system path is accessible without the owner’s authorization.
Questions answered
Where should the logging configuration be saved?
Use the userdata path documented for the actual operating system and installation type, not a path copied from an unrelated platform.
Should I replace an existing advancedsettings.xml wholesale?
Preserve it and add only the intended documented entry without duplicating its outer tags. Keep a recoverable original.
Sources & further reading
Official references for the subjects discussed. Service terms and device software can change.

