@@ -33,10 +33,11 @@ and their memory addresses. Instruction addresses in the [Stack Trace](/sdk/even
3333mapped into the list of debug images in order to retrieve debug files for
3434symbolication.
3535
36- There are two kinds of debug images:
36+ There are three kinds of debug images:
3737
3838- Native debug images with types ` macho ` , ` elf ` , and ` pe `
3939- Android debug images with type ` proguard `
40+ - JavaScript source map debug images with type ` sourcemap `
4041
4142### Mach-O Images
4243
@@ -326,15 +327,15 @@ leading 16 bytes.
326327
327328` debug_file `
328329
329- : _ Optional_ : Name or absolute URL to the WASM file containing debug
330+ : _ Optional_ . Name or absolute URL to the WASM file containing debug
330331information for this image. This value might be required to retrieve debug
331332files from certain symbol servers. This should correspond to the externalized
332333URL pulled from the ` external_debug_info ` custom section.
333334
334335` code_id `
335336
336- : _ Optional_ . Identifier of the WASM file. It is the value of the
337- ` build_id ` custom section formatted as HEX string. It can be omitted in case
337+ : _ Optional_ . Identifier of the WASM file. It is the value of the
338+ ` build_id ` custom section formatted as HEX string. It can be omitted in case
338339the section contains a UUID (16 bytes).
339340
340341` code_file `
@@ -370,6 +371,38 @@ Example:
370371}
371372```
372373
374+ ### Source Map Images
375+
376+ Source Map images are used to provide information about which artifact (i.e.
377+ source map) should be used to resolve a particular JavaScript file to its
378+ original source. We use the ` abs_path ` property of a stack frame and the
379+ ` code_file ` field in the image to query for a source map file via the ` debug_id `
380+ field.
381+
382+ Attributes:
383+
384+ ` type `
385+
386+ : ** Required** . Type of the debug image. Must be ` "sourcemap" ` .
387+
388+ ` code_file `
389+
390+ : ** Required** . Path/Url of the file that should be mapped. Corresponds to the
391+ ` abs_path ` property inside a stack frame.
392+
393+ ` debug_id `
394+
395+ : ** Required** . Identifier of the file that will be used to resolve the source
396+ file.
397+
398+ ``` json
399+ {
400+ "type" : " sourcemap" ,
401+ "code_file" : " https://example.com/static/js/main.js" ,
402+ "debug_id" : " 395835f4-03e0-4436-80d3-136f0749a893"
403+ }
404+ ```
405+
373406## Examples
374407
375408See examples for types of debug images above.
0 commit comments