@@ -7,11 +7,27 @@ r[attributes.debugger.debugger_visualizer]
7
7
## The ` debugger_visualizer ` attribute
8
8
9
9
r[ attributes.debugger.debugger_visualizer.intro]
10
- The * ` debugger_visualizer ` attribute* can be used to embed a debugger visualizer file into the debug information.
10
+ The * ` debugger_visualizer ` [ attribute] [ attributes ] * can be used to embed a debugger visualizer file into the debug information.
11
11
This enables an improved debugger experience for displaying values in the debugger.
12
12
13
+ > [ !EXAMPLE]
14
+ > <!-- ignore: requires external files-->
15
+ > ``` rust,ignore
16
+ > #![debugger_visualizer(natvis_file = "Example.natvis")]
17
+ > #![debugger_visualizer(gdb_script_file = "example.py")]
18
+ > ```
19
+
13
20
r[attributes.debugger.debugger_visualizer.syntax]
14
- It uses the [ MetaListNameValueStr] syntax to specify its inputs, and must be specified as a crate attribute.
21
+ The `debugger_visualizer` attribute uses the [MetaListNameValueStr] syntax to specify its inputs. One of the following keys must be specified:
22
+
23
+ - [`natvis_file`][attributes.debugger.debugger_visualizer.natvis]
24
+ - [`gdb_script_file`][attributes.debugger.debugger_visualizer.gdb]
25
+
26
+ r[attributes.debugger.debugger_visualizer.allowed-positions]
27
+ The `debugger_visualizer` attribute may only be specified on a [module] or crate root.
28
+
29
+ r[attributes.debugger.debugger_visualizer.duplicates]
30
+ Duplicate instances of the `debugger_visualizer` attribute will load all of the specified visualizers.
15
31
16
32
r[attributes.debugger.debugger_visualizer.natvis]
17
33
### Using `debugger_visualizer` with Natvis
@@ -208,3 +224,4 @@ The `external` behavior is the default for macros that don't have this attribute
208
224
[ `-C collapse-macro-debuginfo` ] : ../../rustc/codegen-options/index.html#collapse-macro-debuginfo
209
225
[ `macro_rules` definition ] : ../macros-by-example.md
210
226
[ attribute ] : ../attributes.md
227
+ [ module ] : ../items/modules.md
0 commit comments