Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot attach debugger VSCode C# on Mac #418

Closed
mpeder opened this issue Apr 16, 2021 · 4 comments
Closed

Cannot attach debugger VSCode C# on Mac #418

mpeder opened this issue Apr 16, 2021 · 4 comments

Comments

@mpeder
Copy link

mpeder commented Apr 16, 2021

Environment:
VSCode on Mac developing C#

VSCode:
Version: 1.55.2
Commit: 3c4e3df9e89829dce27b7b5c24508306b151f30d
Date: 2021-04-13T09:36:32.643Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Darwin x64 20.3.0

Version information

Cloud Code Extension version: v1.10.0

VSCode:
Version: 1.55.2
Commit: 3c4e3df9e89829dce27b7b5c24508306b151f30d
Date: 2021-04-13T09:36:32.643Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Darwin x64 20.3.0

Description:
I try to develop Cloud Run locally in VSCode with C# and want to run&debug from VSCode on a Mac. It is not able to attach the debugger and I get this error:
Running the contributed command: 'csharp.listRemoteProcess' failed.

Repro step:
Create a .NET App
Run and debug

@sivakku sivakku added area/debugging area/cloudrun question Further information is requested labels Apr 16, 2021
@sivakku
Copy link
Contributor

sivakku commented Apr 16, 2021

@mpeder - When you do let say "debug on cloud run emulator" form the cloud code menu. it would ask for which process to attach, the quick input is at the top and list various process and you have to pick the first process to debug. You don't need to install anything additionally.

@sivakku
Copy link
Contributor

sivakku commented Apr 16, 2021

What dotnet SDK do you use in your docker file? Some alpine images seem to have this issue. Here is what we are using in our samples. Are you able to debug the sample app that we provide in the Cloud Run(new app) menu? Quoc said you can see if the debugging works by keeping breakpoint on environment.cs line 18(on service field.)

@kschaab
Copy link
Contributor

kschaab commented Apr 19, 2021

This might be the underlying cause: dotnet/vscode-csharp#4096. If so a work around is to use a different image. We are currently looking into some solutions to work around the issue in omnisharp. We can further isolate this by using the base image in the samples as @sivakku references above and see if the problem goes away or persists. It would also be helpful to see if the samples work as @sivakku suggests above.

@quoctruong
Copy link
Contributor

The issue is addressed in the new release. Please give it a try. You can use processId in the debug node to bypass the picking process ID script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants