<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2026"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="waedfi-20260630.xsd" xlink:type="simple"/>
    <context id="c0">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001227862</identifier>
        </entity>
        <period>
            <startDate>2026-01-01</startDate>
            <endDate>2026-06-30</endDate>
        </period>
    </context>
    <dei:EntityRegistrantName contextRef="c0" id="ixv-39">Western Asset Emerging Markets Debt Fund Inc.</dei:EntityRegistrantName>
    <dei:DocumentPeriodEndDate contextRef="c0" id="ixv-79">2026-06-30</dei:DocumentPeriodEndDate>
    <dei:DocumentType contextRef="c0" id="hidden-fact-0">N-CSRS</dei:DocumentType>
    <dei:EntityInvCompanyType contextRef="c0" id="ixv-19189">N-2</dei:EntityInvCompanyType>
    <dei:EntityCentralIndexKey contextRef="c0" id="ixv-19190">0001227862</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag contextRef="c0" id="ixv-19191">false</dei:AmendmentFlag>
</xbrl>
