-
Notifications
You must be signed in to change notification settings - Fork 727
Description
Environment data
VS Code version: 1.9.0-insiders (Commit 80481edbdf1272a87ca54d4c48a829e0a134dffe)
C# Extension version: 1.6.0
OS: Windows 10
CoreCLR: 1.0.1
Steps to reproduce
- Hit F5 on the following program
- After it has been running for a few seconds, set a breakpoint on the sleep call in Main
- After the breakpoint hits, look at the call stack Window
static void Main(string[] args)
{
new Thread(SleepThread).Start();
while (true)
{
Thread.Sleep(100);
}
}
private static void SleepThread(object obj)
{
while (true)
{
Thread.Sleep(100);
}
}Expected behavior
Both threads shown
Actual behavior
Only the main thread is show
Tracing
We do have the issue that we don't return the threads from run mode, but once we hit break mode we are returning the correct set of threads.
C threads: null
R: {"success":true,"message":null,"request_seq":15,"command":"threads","body":{"threads":[]},"running":false,"refs":null,"seq":0,"type":"response"}
E breakpoint: {"reason":"changed","breakpoint":{"id":2,"verified":true,"line":12,"message":null},"type":"breakpoint"}
E stopped: {"threadId":64072,"reason":"breakpoint","source":{"name":"Program.cs","path":"d:\proj\clicon\Program.cs","sourceReference":0},"line":12,"column":13,"text":null,"allThreadsStopped":true,"type":"stopped"}
C threads: null
R: {"success":true,"message":null,"request_seq":16,"command":"threads","body":{"threads":[{"id":64072,"name":"Main Thread"},{"id":41420,"name":""}]},"running":false,"refs":null,"seq":0,"type":"response"}
C stackTrace: {"threadId":64072,"startFrame":0,"levels":20}
R: {"success":true,"message":null,"request_seq":17,"command":"stackTrace","body":{"stackFrames":[{"id":1000,"source":{"name":"Program.cs","path":"d:\proj\clicon\Program.cs","sourceReference":0},"line":12,"column":13,"name":"Program.Main(string[] args)"},{"id":1001,"source":null,"line":0,"column":0,"name":"[External Code]"}],"totalFrames":2},"running":false,"refs":null,"seq":0,"type":"response"}
C scopes: {"frameId":1000}
E output: {"category":"telemetry","output":"VS/Diagnostics/Debugger/ExpressionEvaluator/Compile","data":{"VS.Diagnostics.Debugger.ExpressionEvaluator.Compile.CompilerError":"None","VS.Diagnostics.Debugger.ExpressionEvaluator.Language":"C#","VS.Diagnostics.Debugger.clrdbg.Version":"15.0.26013.0 built by: PREVIEW.DBG2","VS.Diagnostics.Debugger.clrdbg.OSFamily":"Windows","VS.Diagnostics.Debugger.clrdbg.WindowsVersion":"10.0.14393"},"type":"output"}
R: {"success":true,"message":null,"request_seq":18,"command":"scopes","body":{"scopes":[{"name":"Locals","variablesReference":1000,"expensive":false}]},"running":false,"refs":null,"seq":0,"type":"response"}
C variables: {"variablesReference":1000}
R: {"success":true,"message":null,"request_seq":19,"command":"variables","body":{"variables":[{"name":"args [string[]]","value":"{string[0]}","type":"string[]","variablesReference":0,"evaluateName":"args"}]},"running":false,"refs":null,"seq":0,"type":"response"}