Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ lock
/target
.corext/gen
registered_data.ini

.vs/

# quickbuild.exe
/VersionGeneratingLogs/
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ build:
test:
assemblies:
- Microsoft.PowerShell.EditorServices.Test.dll
- Microsoft.PowerShell.EditorServices.Test.Protocol.dll
- Microsoft.PowerShell.EditorServices.Test.Host.dll
- Microsoft.PowerShell.EditorServices.Test.Transport.Stdio.dll
11 changes: 11 additions & 0 deletions src/PowerShellEditorServices.Protocol/Server/DebugAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ protected override void Initialize()
this.SetRequestHandler(EvaluateRequest.Type, this.HandleEvaluateRequest);
}

protected override void Shutdown()
{
Logger.Write(LogLevel.Normal, "Debug adapter is shutting down...");

if (this.editorSession != null)
{
this.editorSession.Dispose();
this.editorSession = null;
}
}

#region Built-in Message Handlers

protected async Task HandleLaunchRequest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ protected override void Shutdown()
{
Logger.Write(LogLevel.Normal, "Language service is shutting down...");

this.editorSession.Dispose();
if (this.editorSession != null)
{
this.editorSession.Dispose();
this.editorSession = null;
}
}

#region Built-in Message Handlers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
<None Include="TestFiles\SimpleSyntaxError.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="xunit.runner.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
Expand Down
4 changes: 4 additions & 0 deletions test/PowerShellEditorServices.Test.Host/xunit.runner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"parallelizeTestCollections": false,
"methodDisplay": "method"
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ void debugService_BreakpointUpdated(object sender, BreakpointUpdatedEventArgs e)

void debugService_DebuggerStopped(object sender, DebuggerStopEventArgs e)
{
this.runnerContext.Post(
(o) =>
{
this.debuggerStoppedQueue.Enqueue(e);
}, null);
this.debuggerStoppedQueue.Enqueue(e);
}

public void Dispose()
Expand Down Expand Up @@ -119,7 +115,6 @@ await this.debugService.SetBreakpoints(
this.debugService.Continue();

await this.AssertDebuggerStopped(this.debugScriptFile.FilePath, 9);
this.debugService.Continue();

// Abort script execution early and wait for completion
this.debugService.Abort();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
<None Include="xunit.runner.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\PowerShellEditorServices\PowerShellEditorServices.csproj">
Expand Down
4 changes: 4 additions & 0 deletions test/PowerShellEditorServices.Test/xunit.runner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"parallelizeTestCollections": false,
"methodDisplay": "method"
}