You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sanitizers/asan-debugger-integration.md
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -34,10 +34,21 @@ When you link the VCAsan library to your executable, users can enable it to gene
34
34
35
35
`set ASAN_SAVE_DUMPS=MyFileName.dmp`
36
36
37
-
The file must have a .dmp suffix to follow the Visual Studio IDE conventions.
37
+
The file must have a `.dmp` extension to follow the Visual Studio IDE conventions. (Prior to 17.7)
38
38
39
39
Here's what happens when a dump file is specified for `ASAN_SAVE_DUMPS`: If an error gets caught by the AddressSanitizer runtime, it saves a crash dump file that has the metadata associated with the error. The debugger in Visual Studio version 16.9 and later can parse the metadata that's saved in the dump file. You can set `ASAN_SAVE_DUMPS` on a per-test basis, store these binary artifacts, and then view them in the IDE with proper source indexing.
40
40
41
+
Visual Studio version 17.7 and later supports the following:
42
+
43
+
* Quoted strings are now handled correctly. In previous versions, for environments inside of Visual Studio or when using PowerShell, setting the environment variable to contain quotes or spaces would fail to create the expected dump file.
44
+
45
+
* When the `.dmp` extension is explicitly specified (for example, `set ASAN_SAVE_DUMPS=MyDmp.dmp`), VCAsan uses it explicitly, and will not add an associated process ID to the dump file name.
46
+
47
+
* If a `.dmp` file already exists with the same name specified from the environment variable, VCAsan modifies the file name as follows:
48
+
* Appends a number to the filename in parentheses. For example, `Myfile (1).dmp`.
49
+
* If after several attempts appending a number in parentheses fails to generate a unique name, the file is saved to an `%APPLOCAL%` temporary path that VCAsan will print. For example, `C:\Users\~\AppData\Local\Temp\Dump.dmp`.
50
+
* If saving to a temporary path fails, a diagnostic error is displayed.
51
+
41
52
## See also
42
53
43
54
[AddressSanitizer overview](./asan.md)\
@@ -47,3 +58,4 @@ Here's what happens when a dump file is specified for `ASAN_SAVE_DUMPS`: If an e
0 commit comments