Closed EthanSK closed 2 years ago
I believe the problem here is that the way process picker commands work they can only specify one property: processId
, but there is another property that also needs to be specified - targetArchitecture
(see documentation).
This extension at least has a bug that we don't seem to specify targetArchitecture
in the schema for attach configurations, and we don't list it in debugger-launchjson.md. @WardenGnaw I am assuming this wasn't done just because in most cases we will automatically figure it out?
Assuming that is it, this issue should probably move to the https://github.com/Microsoft/vscode-azurefunctions to provide a "${command:azureFunctions.targetArchitecture}" command.
I am assuming this wasn't done just because in most cases we will automatically figure it out?
Yep. The extension attempts to use the dotnet information to determine which architecture to use. However, if we fail to get this dotnet information, it uses the architecture of VS Code.
@EthanSK Which version of VS Code are you using?
I can update the OptionsSchema and md file to add targetArchitecture
.
@WardenGnaw I have Apple Silicon only VS Code version: 1.62.2 commit 3a6960b964327f0e3882ce18fcebd07ed191b316 Thanks for looking into it!
@EthanSK Did it work for you after changing your launch.json to:
"configurations": [
{
"name": "Attach to .NET Functions",
"type": "coreclr",
"request": "attach",
"processId": "${command:azureFunctions.pickProcess}",
"targetArchitecture": "x86_64"
}
]
@gregg-miskelly Oh. nice. that worked :D interesting...
Thanks. I edited the original comment to add the work around, and I opened https://github.com/microsoft/vscode-azurefunctions/issues/3005 to track fixing the issue.
Steps to reproduce
Start VSCode debugger with Azure Functions v4 core tools on .net6 with the following launch.json config:
Expected behavior
Debugger should work
Actual behavior
Failed to attach to process: Unknown Error: 0x80131c3c
Work around:
Modify
launch.json
and add"targetArchitecture": "x86_64"
dotnet --info output
.NET SDK (reflecting any global.json): Version: 6.0.100 Commit: 9e8b04bbff
Runtime Environment: OS Name: Mac OS X OS Version: 12.0 OS Platform: Darwin RID: osx-arm64 Base Path: /usr/local/share/dotnet/sdk/6.0.100/
Host (useful for support): Version: 6.0.0 Commit: 4822e3c3aa
.NET SDKs installed: 6.0.100 [/usr/local/share/dotnet/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Azure functions info
Azure Functions Core Tools Core Tools Version: 4.0.3971 Commit hash: d0775d487c93ebd49e9c1166d5c3c01f3c76eaaf (64-bit) Function Runtime Version: 4.0.1.16815
Environment information
VSCode version: 1.62.2 C# Extension: 1.23.16
Mono Information
OmniSharp using built-in monoDotnet Information
.NET SDK (reflecting any global.json): Version: 6.0.100 Commit: 9e8b04bbff Runtime Environment: OS Name: Mac OS X OS Version: 12.0 OS Platform: Darwin RID: osx-arm64 Base Path: /usr/local/share/dotnet/sdk/6.0.100/ Host (useful for support): Version: 6.0.0 Commit: 4822e3c3aa .NET SDKs installed: 6.0.100 [/usr/local/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-downloadVisual Studio Code Extensions
|Extension|Author|Version| |---|---|---| |angular-console|nrwl|17.12.3| |Angular2|johnpapa|12.0.0| |azure-account|ms-vscode|0.9.11| |cmake|twxs|0.0.17| |codespaces|GitHub|1.3.6| |cpptools|ms-vscode|1.7.1| |csharp|ms-dotnettools|1.23.16| |debugger-for-chrome|msjsdiag|4.13.0| |dotnet|formulahendry|0.0.4| |EditorConfig|EditorConfig|0.16.4| |gitlens|eamodio|11.6.1| |java|redhat|1.0.0| |jupyter|ms-toolsai|2021.10.1101450599| |jupyter-keymap|ms-toolsai|1.0.0| |jupyter-renderers|ms-toolsai|1.0.3| |markdown-preview-enhanced|shd101wyy|0.6.1| |matlab|Gimly81|2.2.1| |ng-template|Angular|13.0.0| |playfab-explorer|Playfab|0.1.15| |prettier-vscode|esbenp|9.0.0| |python|ms-python|2021.11.1422169775| |rainbow-csv|mechatroner|1.10.1| |remote-ssh|ms-vscode-remote|0.66.1| |remote-ssh-edit|ms-vscode-remote|0.66.1| |restore-terminals|EthanSK|1.1.6| |swdc-vscode|softwaredotcom|2.6.14| |tcl|bitwisecook|0.4.0| |terraform|4ops|0.2.2| |todo-tree|Gruntfuggly|0.0.214| |unity-code-snippets|kleber-swf|1.3.0| |unity-debug|Unity|3.0.2| |unity-tools|Tobiah|1.2.12| |vscode-apollo|apollographql|1.19.9| |vscode-azurefunctions|ms-azuretools|1.6.0| |vscode-azureresourcegroups|ms-azuretools|0.4.0| |vscode-eslint|dbaeumer|2.2.2| |vscode-graphql|GraphQL|0.3.18| |vscode-icons|vscode-icons-team|11.7.0| |vscode-java-debug|vscjava|0.36.0| |vscode-java-dependency|vscjava|0.18.8| |vscode-java-pack|vscjava|0.18.6| |vscode-java-test|vscjava|0.32.0| |vscode-jest-runner|firsttris|0.4.47| |vscode-maven|vscjava|0.34.1| |vscode-nuget-package-manager|jmrog|1.1.6| |vscode-pylance|ms-python|2021.11.1| |vscode-typescript-tslint-plugin|ms-vscode|1.3.3| |vscodeintellicode|VisualStudioExptTeam|1.2.14| |vsfire|toba|1.4.1|;VS Code version: 1.62.2 commit 3a6960b964327f0e3882ce18fcebd07ed191b316 C# Extension version: v1.23.16
OmniSharp log