Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger doesn't always show all threads in the call stack window #1107

Closed
gregg-miskelly opened this issue Jan 5, 2017 · 0 comments
Closed
Assignees
Milestone

Comments

@gregg-miskelly
Copy link
Contributor

gregg-miskelly commented Jan 5, 2017

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

  1. Hit F5 on the following program
  2. After it has been running for a few seconds, set a breakpoint on the sleep call in Main
  3. 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"}

@gregg-miskelly gregg-miskelly self-assigned this Jan 20, 2017
@gregg-miskelly gregg-miskelly added this to the 1.7 milestone Jan 20, 2017
gregg-miskelly added a commit to gregg-miskelly/vscode-csharp that referenced this issue Jan 20, 2017
This updates the debugger to 1-7-0. This version of the debugger contains a fix for dotnet#1107 and dotnet#1105.
gregg-miskelly added a commit that referenced this issue Jan 21, 2017
This updates the debugger to 1-7-0. This version of the debugger contains a fix for #1107 and #1105.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant