File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
src/PowerShellEditorServices/Services
test/PowerShellEditorServices.Test/Debugging Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public async Task<IReadOnlyList<Breakpoint>> GetBreakpointsAsync()
62
62
63
63
public async Task < IReadOnlyList < BreakpointDetails > > SetBreakpointsAsync ( string escapedScriptPath , IReadOnlyList < BreakpointDetails > breakpoints )
64
64
{
65
- if ( _breakpointSyncService . IsSupported )
65
+ if ( _breakpointSyncService ? . IsSupported is true )
66
66
{
67
67
// Since we're syncing breakpoints outside of debug configurations, if we can't find
68
68
// an existing breakpoint then mark it as unverified.
@@ -249,7 +249,7 @@ public async Task RemoveAllBreakpointsAsync(string scriptPath = null)
249
249
{
250
250
// Only need to remove all breakpoints if we're not able to sync outside of debug
251
251
// sessions.
252
- if ( _breakpointSyncService . IsSupported )
252
+ if ( _breakpointSyncService ? . IsSupported is true )
253
253
{
254
254
return ;
255
255
}
Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ public PsesInternalHost(
240
240
private bool ShouldExitExecutionLoop => _shouldExit || _shuttingDown != 0 ;
241
241
242
242
private BreakpointSyncService BreakpointSync
243
- => _breakpointSyncService ??= _languageServer . GetService < BreakpointSyncService > ( ) ;
243
+ => _breakpointSyncService ??= _languageServer ? . GetService < BreakpointSyncService > ( ) ;
244
244
245
245
public override void EnterNestedPrompt ( ) => PushPowerShellAndRunLoop (
246
246
CreateNestedPowerShell ( CurrentRunspace ) ,
@@ -894,7 +894,7 @@ private void PopPowerShell(RunspaceChangeAction runspaceChangeAction = RunspaceC
894
894
newRunspaceFrame . RunspaceInfo ) ) ;
895
895
}
896
896
897
- if ( BreakpointSync . IsSupported )
897
+ if ( BreakpointSync ? . IsSupported is true )
898
898
{
899
899
BreakpointSync . SyncServerAfterRunspacePop ( ) ;
900
900
}
Original file line number Diff line number Diff line change @@ -53,11 +53,13 @@ public DebugServiceTests()
53
53
psesHost . DebugContext . EnableDebugMode ( ) ;
54
54
psesHost . _readLineProvider . ReadLine = testReadLine ;
55
55
56
+ DebugStateService debugStateService = new ( ) ;
56
57
breakpointService = new BreakpointService (
57
58
NullLoggerFactory . Instance ,
58
59
psesHost ,
59
60
psesHost ,
60
- new DebugStateService ( ) ) ;
61
+ debugStateService ,
62
+ breakpointSyncService : null ) ;
61
63
62
64
debugService = new DebugService (
63
65
psesHost ,
You can’t perform that action at this time.
0 commit comments