Skip to content

Commit 6f3fedd

Browse files
authored
Merge pull request #367 from PowerShell/daviwil/better-runspace-changed
Improve detection of runspace changes
2 parents abf5773 + c6fdc6b commit 6f3fedd

File tree

5 files changed

+491
-281
lines changed

5 files changed

+491
-281
lines changed

src/PowerShellEditorServices.Protocol/Server/DebugAdapter.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,9 @@ await this.SendEvent(
742742

743743
async void powerShellContext_RunspaceChanged(object sender, RunspaceChangedEventArgs e)
744744
{
745-
if (this.waitingForAttach && e.ChangeAction == RunspaceChangeAction.Enter && e.NewRunspace.IsAttached)
745+
if (this.waitingForAttach &&
746+
e.ChangeAction == RunspaceChangeAction.Enter &&
747+
e.NewRunspace.Context == RunspaceContext.DebuggedRunspace)
746748
{
747749
// Send the InitializedEvent so that the debugger will continue
748750
// sending configuration requests

0 commit comments

Comments
 (0)