microsoft / microsoft/vscode-cpptools

[LLDB] The breakpoint can not be hit for F5 after a 'Step over' into a function

Open
#506 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug debugger
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Internal bug id: 259942

Configuration:

VSCode(stable)+ CPP Extension(20160902.1)+ LLDB

Steps to repro:

  1. Copy the debuggee, and open it with VSCode.

src.zip

(You can compile by yourself,please use the command:

step 1: clang++ -g -O0 -std=c++11 -shared -fpic -m64 mylib.cpp -o mylib.so

step 2: clang++ -g -O0 -pthread -std=c++11 -m64 myapp.cpp -o myapp )

  1. Update "program" in launch.json as following:

         "program": "${workspaceRoot}/myapp",
    
  2. Set breakpoints at the line of 73 in myapp.cpp, at the line of 9 in mylib.cpp, at the line of 16 in mylib.cpp.

  3. Press F5 to start debugging.(Hit the breakpoint at the line of 73 in myapp.cpp)

  4. Step over.(Hit the breakpoint at the line of 9 in mylib.cpp)

  5. Click Continue Button

Expected:

Hit the breakpoint at the line of 16 in mylib.cpp.

Actual:

Hit the line of 75 in myapp.cpp.

Investigation:

  1. This issue only repro on Mac.

  2. The step 5(Step over) cause this issue. If change the step 5 to Step into or Continue, the results will be expected.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Mac-only case using myapp.cpp and mylib.cpp, compiling them with the commands in the issue and configuring launch.json. Start with the F5, step-over, and continue sequence under LLDB, then inspect how the breakpoint at line 16 in mylib.cpp is handled. Done means continuing after the step-over hits line 16 rather than line 75 in myapp.cpp.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.