microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
221 stars 10 forks source link

.NET debugging broken YET AGAIN with latest update. #944

Closed timheuer closed 7 months ago

timheuer commented 7 months ago

From vscode-csharp created by ShreyasJejurkar: dotnet/vscode-csharp#6918

Issue Description

.NET debugging does not work.

Why does every release have something to break in the C# extension? Why such bad quality of deliverables? Frustrated. cc @richlander @davidwengier @timheuer

Steps to Reproduce

  1. Create aspnetcore API with dotnet new webapi
  2. Open the folder in VSCode.
  3. Right-click on the project in Solution Explorer and select Debug -> Start new instance. This will trigger a build, once the build succeeds, VSCode navigates to the debug menu but this does not happen anything.
  4. The same happens when you select Start without debugging as well.

https://github.com/dotnet/vscode-csharp/assets/17148381/990b599e-037d-4286-9c89-27d36d4059c2

Expected Behavior

  1. API should start, and VSCode should attached to it to start debugging.

Actual Behavior

Does not happen anything.

Logs

I have passed logs here, not sure why GH does not keep the formatting.

Environment information

VSCode version: 1.86.2 C# Extension: 2.18.16 Using OmniSharp: false

Dotnet Information .NET SDK: Version: 8.0.200 Commit: 438cab6a9d Workload version: 8.0.200-manifests.5638171e Runtime Environment: OS Name: Windows OS Version: 10.0.26063 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.200\ .NET workloads installed: [aspire] Installation Source: VS 17.10.34607.79 Manifest Version: 8.0.0-preview.3.24105.21/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.0.0-preview.3.24105.21\WorkloadManifest.json Install Type: Msi Host: Version: 8.0.2 Architecture: x64 Commit: 1381d5ebd2 .NET SDKs installed: 7.0.404 [C:\Program Files\dotnet\sdk] 8.0.100 [C:\Program Files\dotnet\sdk] 8.0.200 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation] Environment variables: Not set global.json file: Not found Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/download
Visual Studio Code Extensions |Extension|Author|Version|Folder Name| |---|---|---|---| |codespaces|GitHub|1.16.10|github.codespaces-1.16.10| |copilot|GitHub|1.165.0|github.copilot-1.165.0| |copilot-chat|GitHub|0.12.2|github.copilot-chat-0.12.2| |csdevkit|ms-dotnettools|1.3.10|ms-dotnettools.csdevkit-1.3.10-win32-x64| |csharp|ms-dotnettools|2.18.16|ms-dotnettools.csharp-2.18.16-win32-x64| |darker-dark|XavierNaves|1.0.0|xaviernaves.darker-dark-1.0.0| |EditorConfig|EditorConfig|0.16.4|editorconfig.editorconfig-0.16.4| |errorlens|usernamehw|3.16.0|usernamehw.errorlens-3.16.0| |gitlens|eamodio|14.8.2|eamodio.gitlens-14.8.2| |material-icon-theme|PKief|4.34.0|pkief.material-icon-theme-4.34.0| |powershell|ms-vscode|2024.3.0|ms-vscode.powershell-2024.3.0| |prettier-vscode|esbenp|10.1.0|esbenp.prettier-vscode-10.1.0| |remote-containers|ms-vscode-remote|0.338.1|ms-vscode-remote.remote-containers-0.338.1| |remote-wsl|ms-vscode-remote|0.86.0|ms-vscode-remote.remote-wsl-0.86.0| |sonarlint-vscode|SonarSource|4.3.0|sonarsource.sonarlint-vscode-4.3.0-win32-x64| |vscode-conventional-commits|vivaxy|1.25.0|vivaxy.vscode-conventional-commits-1.25.0| |vscode-docker|ms-azuretools|1.29.0|ms-azuretools.vscode-docker-1.29.0| |vscode-dotnet-runtime|ms-dotnettools|2.0.1|ms-dotnettools.vscode-dotnet-runtime-2.0.1| |vscode-eslint|dbaeumer|2.4.4|dbaeumer.vscode-eslint-2.4.4| |vscode-jest|Orta|6.2.2|orta.vscode-jest-6.2.2|; `
timheuer commented 7 months ago

@WardenGnaw

timheuer commented 7 months ago

I cannot repro unfortunately @shreyas C# Dev Kit version: v1.4.6 (pre-release)

https://github.com/microsoft/vscode-dotnettools/assets/4821/9d3b0123-e89b-4062-afae-eaceb365a388

ShreyasJejurkar commented 7 months ago

Hi @timheuer , thanks for the quick reply. Try it on VSCode instead of VSCode insiders to match it correctly.

Is there any way we can see debugger logs, on why it's failing? So that we could know exact issue?

ShreyasJejurkar commented 7 months ago

Moreover, I am on a stable version of extensions and not pre-release. I don't have the guts to even try pre-release given the fact that this kinda of instability issue exists on the release version itself.

timheuer commented 7 months ago

Moreover, I am on a stable version of extensions and not pre-release. I don't have the guts to even try pre-release given the fact that this kinda of instability issue exists on the release version itself.

VSC-Insiders vs. regular shouldn't make a diff...our team stays on VSC-insiders to watch out for shell API changes. It would be interesting to have you try the pre-release channel of the extension to see if any difference. It isn't a 'daily' build so there is not a complete lack of stability there ;-). Mind giving that a try on your machine just to see if there is a diff? easy to switch back...

ShreyasJejurkar commented 7 months ago

Moreover, I am on a stable version of extensions and not pre-release. I don't have the guts to even try pre-release given the fact that this kinda of instability issue exists on the release version itself.

VSC-Insiders vs. regular shouldn't make a diff...our team stays on VSC-insiders to watch out for shell API changes. It would be interesting to have you try the pre-release channel of the extension to see if any difference. It isn't a 'daily' build so there is not a complete lack of stability there ;-). Mind giving that a try on your machine just to see if there is a diff? easy to switch back...

I have tried @timheuer earlier that too. I was on pre-release only for both extensions but got this issue, then switched back to release, and still the same issue. But I will give a try now again and will post it again.

ShreyasJejurkar commented 7 months ago

Here is the video. @timheuer

https://github.com/microsoft/vscode-dotnettools/assets/17148381/96f9b119-0367-4e26-a034-ae7b4574995a

ShreyasJejurkar commented 7 months ago

Even if you do Start without debugging it still does not run the API for some reason.

timheuer commented 7 months ago

Ok, thanks for confirming. Will need debugger folks to chime in with some hypothesis here (@WardenGnaw / @tmeschter)

To unblock (and try a few other things):

Else generating the launch.json assets would be an unblock until we can figure this out too.

WardenGnaw commented 7 months ago

I have one hunch, do you have nuget symbol server enabled in your settings? If you disable this, does debugging work?

jvert commented 7 months ago

I had to remove "searchNuGetOrgSymbolServer": true from my launch.json configuration in order to get debugging in vscode to work. It worked fine yesterday.

WardenGnaw commented 7 months ago

Moving back to https://github.com/dotnet/vscode-csharp/issues/6918 as this affects all of C# Extension not C# Dev Kit.