vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Clicking a stack frame with no source causes its line number to disappear

Open andrewcrawley opened this issue 10 years ago • 0 comments

  • VSCode Version: 1.3.1
  • OS Version: Ubuntu 16.04 (x64)

Steps to Reproduce:

  1. Install the C++ Tools extension ("ext install cpptools")
  2. Save the following as "main.cpp":
#include <iostream>
#include <pthread.h>

void * thread_proc(void* ctx)
{
    std::cout << "Hello from new thread!" << std::endl;
}

int main (int argc, char **argv) {
    pthread_t thread;

    std::cout << "Hello from main thread!" << std::endl;

    pthread_create(&thread, NULL, &thread_proc, NULL);    
    pthread_join(thread, NULL);

    std::cout << "So long!" << std::endl;

    return 1;
}
  1. Compile (g++ -o test main.cpp -lpthread)
  2. Set a breakpoint on line 6.
  3. Run

When the breakpoint is hit, the Call Stack for the active thread will contain the line numbers for all stack frames:

before

After clicking on a frame that lacks source, however, the line number disappears:

after

Possibly related to the fix for #4608? I'd expect that if the debug adapter can provide the correct line numbers, they shouldn't be hidden just because the source file is unavailable.

andrewcrawley avatar Jul 13 '16 22:07 andrewcrawley