@@ -81,6 +81,7 @@ e.OriginalEvent.Breakpoints[0] is CommandBreakpoint
81
81
new StoppedEvent
82
82
{
83
83
ThreadId = 1 ,
84
+ AllThreadsStopped = true ,
84
85
Reason = debuggerStoppedReason
85
86
} ) ;
86
87
}
@@ -117,59 +118,47 @@ private void PowerShellContext_DebuggerResumed(object sender, DebuggerResumeActi
117
118
_debugAdapterServer . SendNotification ( EventNames . Continued ,
118
119
new ContinuedEvent
119
120
{
120
- AllThreadsContinued = true ,
121
- ThreadId = 1
121
+ ThreadId = 1 ,
122
+ AllThreadsContinued = true
122
123
} ) ;
123
124
}
124
125
125
126
private void DebugService_BreakpointUpdated ( object sender , BreakpointUpdatedEventArgs e )
126
127
{
127
- string reason = "changed" ;
128
-
128
+ // Don't send breakpoint update notifications when setting
129
+ // breakpoints on behalf of the client.
129
130
if ( _debugStateService . IsSetBreakpointInProgress )
130
131
{
131
- // Don't send breakpoint update notifications when setting
132
- // breakpoints on behalf of the client.
133
132
return ;
134
133
}
135
134
136
- switch ( e . UpdateType )
137
- {
138
- case BreakpointUpdateType . Set :
139
- reason = "new" ;
140
- break ;
141
-
142
- case BreakpointUpdateType . Removed :
143
- reason = "removed" ;
144
- break ;
145
- }
146
-
147
- var breakpoint = new OmniSharp . Extensions . DebugAdapter . Protocol . Models . Breakpoint
148
- {
149
- Verified = e . UpdateType != BreakpointUpdateType . Disabled
150
- } ;
151
-
152
135
if ( e . Breakpoint is LineBreakpoint )
153
136
{
154
- breakpoint = LspDebugUtils . CreateBreakpoint ( BreakpointDetails . Create ( e . Breakpoint ) ) ;
137
+ var breakpoint = LspDebugUtils . CreateBreakpoint (
138
+ BreakpointDetails . Create ( e . Breakpoint , e . UpdateType )
139
+ ) ;
140
+
141
+ string reason = ( e . UpdateType ) switch {
142
+ BreakpointUpdateType . Set => "new" ,
143
+ BreakpointUpdateType . Removed => "removed" ,
144
+ BreakpointUpdateType . Enabled => "changed" ,
145
+ BreakpointUpdateType . Disabled => "changed" ,
146
+ _ => "unknown"
147
+ } ;
148
+
149
+ _debugAdapterServer . SendNotification (
150
+ EventNames . Breakpoint ,
151
+ new BreakpointEvent { Reason = reason , Breakpoint = breakpoint }
152
+ ) ;
155
153
}
156
154
else if ( e . Breakpoint is CommandBreakpoint )
157
155
{
158
156
_logger . LogTrace ( "Function breakpoint updated event is not supported yet" ) ;
159
- return ;
160
157
}
161
158
else
162
159
{
163
160
_logger . LogError ( $ "Unrecognized breakpoint type { e . Breakpoint . GetType ( ) . FullName } ") ;
164
- return ;
165
161
}
166
-
167
- _debugAdapterServer . SendNotification ( EventNames . Breakpoint ,
168
- new BreakpointEvent
169
- {
170
- Reason = reason ,
171
- Breakpoint = breakpoint
172
- } ) ;
173
162
}
174
163
175
164
#endregion
0 commit comments