Source maps

Source maps are files used in Discord’s client builds that map the bundled and minified production code back to the original source files, allowing staff and developers to debug errors using readable file names, line numbers, and original code instead of the compiled output.

The cookie for source maps is sourceMap, however the format is unknown. This cookie is used and verified by a Cloudflare worker on all *.discord.com/assets/*.map files. If you provide an invalid cookie, the worker will throw a 404 page.

Endpoints

The base url for these endpoints is https://canary.discord.com/__development/.

Enable source maps

PUT/source_maps

Enables source maps on the client.

Response Body
FieldTypeDescription
sourceMapCookieTTLSecondsintegerThe source map cookie TTL in seconds

Disable source maps

DELETE/source_maps

Disables source maps on the client.

Response Body

Returns a 204 empty body status code upon success. With set-cookie header being equal to sourceMap=null; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT;