dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.87k stars 675 forks source link

Cannot attach to .Net Functions (coreclr) #4429

Closed rbdalvi closed 4 days ago

rbdalvi commented 3 years ago

Issue Description

This started to occur after VS Code automatically upgraded to 1.54.1 on restart. Downgrading to earlier version resolves this issue. But then VS Code auto-upgrades on restart and the problem returns.

Raised https://github.com/microsoft/vscode/issues/118343 with VS Code folks. But they determined it is caused by the C# extension. At least one other person @dochoss is facing the same issue.

NOTE: I have the following in a global.json file in the root folder to force SDK 3.1 instead of 5.0 { "sdk": { "version": "3.1.402" } }

Steps to Reproduce

Create a .Net Function (coreclr) written in C# and hit F5.

Expected Behavior

Debug toolbar should appear on the top of the editor.

Actual Behavior

Getting error "Cannot read property 'map' of undefined'".

Logs

OmniSharp log

Unavailable.

C# log

Unavailable.

C# debugger log

Followed https://github.com/OmniSharp/omnisharp-vscode/wiki/Enabling-C%23-debugger-logging#full-method But this did not print anything in the terminal.

Extension Host log

[2021-03-07 22:09:23.147] [exthost] [error] [msazurermtools.azurerm-vscode-tools] provider FAILED [2021-03-07 22:09:23.147] [exthost] [error] TypeError: Cannot read property 'getReferenceSiteInfo' of undefined at RenameCodeActionProvider. (c:\Users\rdalvi.vscode\extensions\msazurermtools.azurerm-vscode-tools-0.14.1\dist\extension.bundle.js:239:77716) at Generator.next () at fulfilled (c:\Users\rdalvi.vscode\extensions\msazurermtools.azurerm-vscode-tools-0.14.1\dist\extension.bundle.js:239:77162) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:97:5)

Environment information

VSCode version: 1.54.1 C# Extension: 1.23.9

Dotnet Information .NET SDK (reflecting any global.json): Version: 5.0.100 Commit: 5044b93829 Runtime Environment: OS Name: Windows OS Version: 10.0.18363 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\5.0.100\ Host (useful for support): Version: 5.0.0 Commit: cf258a14b7 .NET SDKs installed: 3.1.404 [C:\Program Files\dotnet\sdk] 5.0.100 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |aadb2c|AzureADB2CTools|1.2.104| |application-insights|VisualStudioOnlineApplicationInsights|0.4.2| |armview|bencoleman|0.4.5| |azure-account|ms-vscode|0.9.7| |azurecli|ms-vscode|0.5.0| |azurerm-vscode-tools|msazurermtools|0.14.1| |Bookmarks|alefragnani|13.0.3| |csharp|ms-dotnettools|1.23.9| |debugger-for-chrome|msjsdiag|4.12.12| |dotnet-test-explorer|formulahendry|0.7.5| |find-then-jump|tranhl|2.0.4| |githistory|donjayamanne|0.6.14| |gitlens|eamodio|11.3.0| |js-debug-nightly|ms-vscode|2021.3.517| |json|ZainChen|2.0.2| |material-icon-theme|PKief|4.5.0| |open-in-browser|techer|2.0.0| |powershell|ms-vscode|2021.2.2| |prettier-vscode|esbenp|5.9.2| |remote-containers|ms-vscode-remote|0.163.0| |remote-wsl|ms-vscode-remote|0.54.0| |rest-client|humao|0.24.4| |swagger-viewer|Arjun|3.0.1| |team|ms-vsts|1.161.1| |vsc-community-material-theme|Equinusocio|1.4.2| |vsc-material-theme|Equinusocio|33.1.2| |vsc-material-theme-icons|equinusocio|1.2.2| |vscode-apimanagement|ms-azuretools|1.0.0| |vscode-azureappservice|ms-azuretools|0.21.1| |vscode-azurefunctions|ms-azuretools|1.2.1| |vscode-azureresourcegroups|ms-azuretools|0.3.0| |vscode-azurestorage|ms-azuretools|0.12.0| |vscode-cosmosdb|ms-azuretools|0.16.0| |vscode-docker|ms-azuretools|1.10.0| |vscode-dotnet-runtime|ms-dotnettools|1.0.0| |vscode-icons|vscode-icons-team|11.1.0| |vscode-json-path|weijunyu|2.4.0| |vscode-logicapps|ms-azuretools|1.0.6| |vscode-node-azure-pack|ms-vscode|0.1.0| |vscode-nxunit-test-adapter|wghats|0.1.3| |vscode-openapi|42Crunch|4.1.1| |vscode-peacock|johnpapa|3.9.1| |vscode-test-explorer|hbenl|2.19.5| |vscode-yaml|redhat|0.16.0| |vscodeintellicode|VisualStudioExptTeam|1.2.11| |xml|DotJoshJohnson|2.5.1|;
gregg-miskelly commented 3 years ago

You may need to follow up with a different extension (Azure Tools?) since it sounds like your failure is before getting to the debugger.

JoeRobich commented 4 days ago

Closing as answered