File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/PowerShellEditorServices/Services/DebugAdapter/Handlers Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 7
7
using System . Threading . Tasks ;
8
8
using OmniSharp . Extensions . DebugAdapter . Protocol . Models ;
9
9
using OmniSharp . Extensions . DebugAdapter . Protocol . Requests ;
10
+ using Thread = OmniSharp . Extensions . DebugAdapter . Protocol . Models . Thread ;
10
11
11
12
namespace Microsoft . PowerShell . EditorServices . Handlers
12
13
{
13
14
internal class ThreadsHandler : IThreadsHandler
14
15
{
16
+ internal static Thread PipelineThread { get ; } =
17
+ new Thread { Id = 1 , Name = "PowerShell Pipeline Thread" } ;
18
+
15
19
public Task < ThreadsResponse > Handle ( ThreadsArguments request , CancellationToken cancellationToken )
16
20
{
17
21
return Task . FromResult ( new ThreadsResponse
18
22
{
19
- // TODO: This is an empty container of threads...do we need to make a thread?
20
- Threads = new Container < System . Threading . Thread > ( )
23
+ // TODO: OmniSharp supports multithreaded debugging (where
24
+ // multiple threads can be debugged at once), but we don't. This
25
+ // means we always need to set AllThreadsStoppped and
26
+ // AllThreadsContinued in our events. But if we one day support
27
+ // multithreaded debugging, we'd need a way to associate
28
+ // debugged runspaces with .NET threads in a consistent way.
29
+ Threads = new Container < Thread > ( PipelineThread )
21
30
} ) ;
22
31
}
23
32
}
You can’t perform that action at this time.
0 commit comments