Breakpoints disappeared after starting a debugging session
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 737
- Avg merge
- 18h 40m
- Merged PRs (30d)
- 31
Description
## Environment data
`dotnet --info` output:
```
.NET Core SDK (reflecting any global.json):
Version: 3.1.301
Commit: 7feb845744
Runtime Environment:
OS Name: Windows
OS Version: 10.0.16299
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.301\
Host (useful for support):
Version: 3.1.5
Commit: 65cd789777
.NET Core SDKs installed:
2.2.402 [C:\Program Files\dotnet\sdk]
3.1.301 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
```
VS Code version: **1.47.2**
C# Extension version: **1.22.1**
## Description
Here is a very weird debugger behaviour I encountered today. Recently I upgraded OmniSharp C# extension from **1.21.18** to **1.22.1**. Today it was the 1st time I used this newly upgraded version to carry out a debugging session. I have a **.NET Core 3.1 Web API project**. The breakpoints disappear right after either launching it or attaching to a process! But during debugging, it stops at the statements where breakpoints were set up even they disappeared visually. No current statement indicator show up either like the below one.

When hovering the mouse on a local variable, **only** _type info_ shows up but no _run time value info_, like the below one.

All the thing just looks like it isn't in a debugging session at all. But the **call stack** does show up properly, so I know the execution pauses. Further if double clicking any call in the call stack, it does take me to that call, and the current statement indicator shows up as normal like the below one.

If hovering the mouse on a local variable in that call, its _run time value info_ **does** show up properly as normal! (like the below one).

I uninstalled and re-install the **1.22.1** version a few times and ended in no difference. So i downgraded this **OmniSharp C# extension** to **1.21.18**, and found that **1.21.18** worked perfectly! Thus I created a **simple .NET Core 3.1 Web API project**, found that the latest **1.22.1** version worked fine with this simple project! Thus I compared the two projects' `.csproj` files. Found some difference I thought it might matter, so I commented out some line in my problematic project's `.csproj` file to make them the same:
``` XML
netcoreapp3.1
```
During debugging, the **OmniSharp C# extension**'s behaviors are normal now. So I thought at least one of those 3 commented out lines caused the issue. To find out which one, I uncommented each line one by one to see what happened. At the end all 3 lines were uncommented i.e., _rolled back completely actually_, and the debugger still worked fine. In other words, the ISSUE just disappeared without **ANY** real changes. The debugger works fine since! Very confused why the debugger has such a weird behaviour.
Contributor guide
Assessment
This issue has not been assessed yet.