Skip to content

Commit 55c749d

Browse files
Fix crash in debug config
The assert here didn't really make sense, since when it's serialized to json `Id` will obviously be accessed.
1 parent 17f3e8c commit 55c749d

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/PowerShellEditorServices/Services/DebugAdapter/Handlers/ClientBreakpointHandler.cs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#nullable enable
55

6-
using System.Diagnostics;
76
using System.Linq;
87
using System.Threading;
98
using System.Threading.Tasks;
@@ -28,22 +27,9 @@ internal record ClientBreakpoint(
2827
[property: Optional] ClientLocation? Location = null,
2928
[property: Optional] string? FunctionName = null)
3029
{
31-
private string? _id;
32-
3330
// The ID needs to come from the client, so if the breakpoint is originating on the server
3431
// then we need to create an ID-less breakpoint to send over to the client.
35-
public string Id
36-
{
37-
get
38-
{
39-
Debug.Assert(
40-
_id is not null,
41-
"Caller should ensure ClientBreakpoint ID is retrieved by the client prior to calling this property.");
42-
43-
return _id!;
44-
}
45-
set => _id = value;
46-
}
32+
public string? Id { get; set; }
4733
}
4834

4935
internal record ClientBreakpointsChangedEvents(

0 commit comments

Comments
 (0)