Skip to content

Commit 1d66936

Browse files
committed
edits
1 parent fe25f60 commit 1d66936

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

docs/profiling/add-user-marks-to-timeline.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,21 @@ User Marks enable you to track custom events against Visual Studio's Profiler to
1717
:::image type="content" source="../profiling/media/vs-2022/profiling-user-marks.png" alt-text="Screenshot showing profiling user marks":::
1818

1919
> [!NOTE]
20-
> This feature requires Visual Studio 2022 version 17.11 Preview 2. The feature is available in the Performance Profiler and not while debugging in the Diagnostics Hub.
20+
> This feature requires Visual Studio 2022 version 17.11 Preview 3. The feature is available in the Performance Profiler and not while debugging in the Diagnostics Hub.
2121
2222
## Installation and setup
2323

24-
- Add the NuGet Package (.NET)
24+
You can install support for the feature using either the NuGet package or by adding the correct source files.
25+
26+
- Install using the NuGet Package (C#)
2527

2628
Download the package, [Microsoft.VisualStudio.DiagnosticsHub.UserMarks](https://www.nuget.org/packages/Microsoft.VisualStudio.DiagnosticsHub.UserMarks).
2729

28-
- Add source files (.NET, C++)
30+
- Install by adding source files (C#, C++)
2931

3032
After installing Visual Studio, open the following folder: *[VS installation path]\Common7\IDE\CommonExtensions\Platform\DiagnosticsHub*.
3133

32-
For managed C# code, add *UserMarks.cs* and *UserMarksRange.cs* to your project.
34+
For C# code, add *UserMarks.cs* and *UserMarksRange.cs* to your project.
3335

3436
For native C++ code, add *UserMarks.h* to your project.
3537

@@ -48,19 +50,21 @@ To add the definition in Visual Studio:
4850
Add the user marks object and emit. The following code shows an example of adding user marks.
4951

5052
```csharp
53+
using Microsoft.DiagnosticsHub;
54+
5155
// Create a user mark
52-
var myUserMark = new UserMark("MyMark");
56+
var myUserMark = new UserMarks("MyMark");
5357

5458
// Emit the usermark
55-
myUserMark.EmitMessage("Event happened!");
59+
myUserMark.Emit("Event happened!");
5660

5761
// Emit statically
58-
UserMark.Emit("Emitting just a message");
62+
UserMarks.EmitMessage("Emitting just a message");
5963

6064
// Emitting a range
61-
using (var myRange = new UserMarksRange("MyMethodRange"))
65+
using (var myRange = new UserMarkRange("MyMethodRange"))
6266
{
63-
// Your code here
67+
// Your code here
6468
}
6569
```
6670

Loading

0 commit comments

Comments
 (0)