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

[BUG] Cannot debug a net8 under macOS Monterey #1377

Open stefc opened 1 month ago

stefc commented 1 month ago

Describe the Issue

I want to debug a console app written with c# net8 under MacOs. Under a modern laptop (macOS Ventura) it works well under Monterey the debugger launched and directly stopping the process. See Log

-> (C) {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"coreclr","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true},"type":"request","seq":1}
-> (C) {"command":"launch","arguments":{"name":".NET Core Launch (console)","type":"coreclr","request":"launch","preLaunchTask":"build","program":"/Users/stefc/Projects/stefc/xload-rss/bin/Debug/net8.0/xload-rss.dll","args":["2018"],"cwd":"/Users/stefc/Projects/stefc/xload-rss","console":"internalConsole","stopAtEntry":true,"logging":{"diagnosticsLog":{"protocolMessages":false}},"__configurationTarget":6,"internalConsoleOptions":"openOnSessionStart","__sessionId":"e4970041-21e6-48ce-9d99-7e473499a19a"},"type":"request","seq":2}
------------------------------------------------------------------------------
You may only use the Microsoft Visual Studio .NET/C/C++ Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software to help you
develop and test your applications.
------------------------------------------------------------------------------
<- (R) {"seq":5,"type":"response","request_seq":2,"success":true,"command":"launch"}
<- (E) {"seq":6,"type":"event","event":"initialized","body":{}}
-> (C) {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":3}
<- (R) {"seq":7,"type":"response","request_seq":3,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]}}
-> (C) {"command":"setExceptionBreakpoints","arguments":{"filters":[],"filterOptions":[]},"type":"request","seq":4}
<- (R) {"seq":8,"type":"response","request_seq":4,"success":true,"command":"setExceptionBreakpoints","body":{}}
-> (C) {"command":"configurationDone","type":"request","seq":5}
<- (E) {"seq":9,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/ProcessCreate","data":{"VS.Diagnostics.Debugger.vsdbg.Distribution.Version":"21.6.0","VS.Diagnostics.Debugger.vsdbg.Distribution.Name":"Darwin","VS.Diagnostics.Debugger.vsdbg.OSFamily":"Darwin","VS.Diagnostics.Debugger.vsdbg.TargetArchitecture":"AMD64","VS.Diagnostics.Debugger.vsdbg.Version":"17.12.10724.2 commit:101784ba545ae2a8c8dc7378f03df84ce7d6a4df"}}}
<- (E) {"seq":10,"type":"event","event":"process","body":{"name":"/Users/stefc/Projects/stefc/xload-rss/bin/Debug/net8.0/xload-rss.dll","systemProcessId":4659,"isLocalProcess":true,"startMethod":"launch"}}
<- (R) {"seq":11,"type":"response","request_seq":5,"success":true,"command":"configurationDone"}
-> (C) {"command":"threads","type":"request","seq":6}
<- (R) {"seq":12,"type":"response","request_seq":6,"success":true,"command":"threads","body":{"threads":[]}}
ServiceBroker Start: 0 : Requesting proxy to "Microsoft.VisualStudio.Debugger.ManagedEditAndContinueRemoteDebuggerService2 (0.1)"
ServiceBroker Start: 0 : Requesting proxy to "Microsoft.VisualStudio.Debugger.ManagedEditAndContinueCsDevKitEngineService2 (0.1)"
ServiceBroker Transfer: 0 : Transfer, relatedActivityId=6bd4c6b4-0a42-4d41-87e6-e6c2b9123e2c
ServiceBroker Start: 0 : Requesting pipe to "Microsoft.VisualStudio.Server.IBrokeredServiceBridgeManifest (0.1)"
ServiceBroker Stop: 0 : Requesting pipe to "Microsoft.VisualStudio.Server.IBrokeredServiceBridgeManifest (0.1)"
ServiceBroker Transfer: 0 : Transfer, relatedActivityId=73dd8a41-cb1e-4946-a94c-062a9cc69d4b
xload-rss.dll (4659): Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/8.0.8/System.Private.CoreLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
<- (E) {"seq":14,"type":"event","event":"module","body":{"reason":"new","module":{"id":1000,"name":"System.Private.CoreLib.dll","path":"/usr/local/share/dotnet/shared/Microsoft.NETCore.App/8.0.8/System.Private.CoreLib.dll","isOptimized":true,"isUserCode":false,"version":"8.00.824.36612","symbolStatus":"Skipped loading symbols."}}}
<- (E) {"seq":15,"type":"event","event":"thread","body":{"reason":"started","threadId":53235}}
-> (C) {"command":"threads","type":"request","seq":7}
<- (R) {"seq":16,"type":"response","request_seq":7,"success":true,"command":"threads","body":{"threads":[{"id":53235,"name":"Thread #53235"}]}}
ServiceBroker Stop: 0 : Requesting proxy to "Microsoft.VisualStudio.Debugger.ManagedEditAndContinueRemoteDebuggerService2 (0.1)"
ServiceBroker Stop: 0 : Requesting proxy to "Microsoft.VisualStudio.Debugger.ManagedEditAndContinueCsDevKitEngineService2 (0.1)"
<- (E) {"seq":17,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/Launch","data":{"VS.Diagnostics.Debugger.vsdbg.AdapterId":"coreclr","VS.Diagnostics.Debugger.vsdbg.Launch.DebuggerStartTime":1470,"VS.Diagnostics.Debugger.vsdbg.SourceFileMappings":0,"VS.Diagnostics.Debugger.vsdbg.TargetType":"Live","VS.Diagnostics.Debugger.vsdbg.Distribution.Version":"21.6.0","VS.Diagnostics.Debugger.vsdbg.Distribution.Name":"Darwin","VS.Diagnostics.Debugger.vsdbg.TargetCLRVersion":"8.0.824.36612","VS.Diagnostics.Debugger.vsdbg.OSFamily":"Darwin","VS.Diagnostics.Debugger.vsdbg.VisualizerFileUsed":false,"VS.Diagnostics.Debugger.vsdbg.Version":"17.12.10724.2 commit:101784ba545ae2a8c8dc7378f03df84ce7d6a4df"}}}
***<- (E) {"seq":18,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/ProcessExit","data":{"VS.Diagnostics.Debugger.vsdbg.AdapterId":"coreclr","VS.Diagnostics.Debugger.vsdbg.ProcessExit.StdInWrittenTo":false,"VS.Diagnostics.Debugger.vsdbg.Distribution.Name":"Darwin","VS.Diagnostics.Debugger.vsdbg.Distribution.Version":"21.6.0","VS.Diagnostics.Debugger.vsdbg.ProcessExit.StdInReadFrom":false,"VS.Diagnostics.Debugger.vsdbg.TargetCLRVersion":"8.0.824.36612","VS.Diagnostics.Debugger.vsdbg.Version":"17.12.10724.2 commit:101784ba545ae2a8c8dc7378f03df84ce7d6a4df","VS.Diagnostics.Debugger.vsdbg.OSFamily":"Darwin"}}}
The program '[4659] xload-rss.dll' has exited with code 0 (0x0).***
<- (E) {"seq":20,"type":"event","event":"exited","body":{"exitCode":0}}
<- (E) {"seq":21,"type":"event","event":"terminated","body":{}}
-> (C) {"command":"disconnect","arguments":{"restart":false,"terminateDebuggee":false},"type":"request","seq":8}
<- (E) {"seq":22,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/DebugCompleted","data":{"VS.Diagnostics.Debugger.vsdbg.AdapterId":"coreclr","VS.Diagnostics.Debugger.vsdbg.Distribution.Version":"21.6.0","VS.Diagnostics.Debugger.vsdbg.Distribution.Name":"Darwin","VS.Diagnostics.Debugger.vsdbg.TargetCLRVersion":"8.0.824.36612","VS.Diagnostics.Debugger.vsdbg.Version":"17.12.10724.2 commit:101784ba545ae2a8c8dc7378f03df84ce7d6a4df","VS.Diagnostics.Debugger.vsdbg.DebugCompleted.BreakCounter":0,"VS.Diagnostics.Debugger.vsdbg.OSFamily":"Darwin"}}}
<- (R) {"seq":23,"type":"response","request_seq":8,"success":true,"command":"disconnect"}

It seems that the debugger cannot launch the process correctly and directly exit the process suddenly.

Steps To Reproduce

No response

Expected Behavior

The first breakpoint should work.

Environment Information

Extension Author (truncated) Version csdevkit ms- 1.10.6 csharp ms- 2.43.16 vscode-dotnet-runtime ms- 2.1.2

WardenGnaw commented 1 month ago

@stefc Is this an Apple Silicon chip machine running macOS Monterey or an Intel chip?

stefc commented 1 month ago

Intel Chip MacBookPro from 2010 so quiet old but still running Monterey dotnet8 Vscode

Greetings Andrew Wang @.***> schrieb am Di. 20. Aug. 2024 um 20:12:

@stefc https://github.com/stefc Is this an Apple Silicon chip machine running macOS Monterey or an Intel chip?

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-dotnettools/issues/1377#issuecomment-2299454995, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADROOENQ6ABT62ILYAGCVDZSOBJ3AVCNFSM6AAAAABMZGJOVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJZGQ2TIOJZGU . You are receiving this because you were mentioned.Message ID: @.***>