dotnet --info:
.NET Core SDK (reflecting any global.json):
Version: 2.2.102
Commit: 96ff75a873
Runtime Environment:
OS Name: antergos
OS Version:
OS Platform: Linux
RID: arch-x64
Base Path: /opt/dotnet/sdk/2.2.102/
Host (useful for support):
Version: 2.2.1
Commit: 878dd11e62
.NET Core SDKs installed:
2.2.102 [/opt/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.NETCore.App 2.2.1 [/opt/dotnet/shared/Microsoft.NETCore.App]
VS Code version:
Version: 1.30.2
Commit: 61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
Date: 2019-01-08T23:10:56.746Z
Electron: 2.0.16
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Linux x64 4.20.4-arch1-1-ARCH
C# Extension version:
1.17.1
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/bin/Debug/netcoreapp2.2/test.dll",
"args": [],
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
{
"label": "build",
"command": "dotnet build",
"type": "shell",
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
}
Starts debugger and Print out "Hello world" in the debug console
After the preLaunchTask, the debugger just stops without any error output and not printing "Hello World!" in the debug console.
Can you enable logging and see what gets printed?
Can you enable logging and see what gets printed?
Sure will do when I get home from work in 8-10 hours
Enabling the logging didn't seem to do anything. The log file either never got created or I just couldn't find it. Although I did try to set the directory and file name but still, no file was created.
What fixed it for me was a solution from a different issue :
1) Uninstall the C# Plugin & close VSCode
2) Go to ~/.vscode/extensions/ and remove the entire ms-vscode.csharp-
3) Re-open VSCode and install the extension again, it then downloads the updates and debugging with F5 works again.
edit: extension not plugin
Glad you figured it out!
I did the steps jchand99 mentioned but didn't solve it for me, I still can't print out when running a simple hello world console app.
Anyway here is a log that was outputed in the debug console when logging was set to true:
-> (C) {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Code - OSS","adapterID":"coreclr","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us"},"type":"request","seq":1}
-> (C) {"command":"launch","arguments":{"logging":{"engineLogging":false},"name":".NET Core Launch (console)","type":"coreclr","request":"launch","preLaunchTask":"build","program":"/home/kokefa/programming/test/bin/Debug/netcoreapp2.2/test.dll","args":[],"cwd":"/home/kokefa/programming/test","console":"internalConsole","stopAtEntry":false,"internalConsoleOptions":"openOnSessionStart","__sessionId":"4a64e018-c61c-41a3-802d-a6f46ff8e42f"},"type":"request","seq":2}
<- (E) {"seq":3,"type":"event","event":"output","body":{"category":"console","output":"-------------------------------------------------------------------\nYou may only use the Microsoft .NET Core Debugger (vsdbg) with\nVisual Studio Code, Visual Studio or Visual Studio for Mac software\nto help you develop and test your applications.\n-------------------------------------------------------------------\n"}}
-------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
<- (R) {"seq":4,"type":"response","request_seq":2,"success":true,"command":"launch"}
<- (E) {"seq":5,"type":"event","event":"initialized","body":{}}
<- (E) {"seq":6,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/CommandFailed","data":{"VS.Diagnostics.Debugger.vsdbg.AdapterId":"coreclr","VS.Diagnostics.Debugger.vsdbg.ErrorCode":-1989017584,"VS.Diagnostics.Debugger.vsdbg.Distribution.Name":"antergos","VS.Diagnostics.Debugger.vsdbg.Command":"handshake","VS.Diagnostics.Debugger.vsdbg.OSFamily":"Linux","VS.Diagnostics.Debugger.vsdbg.Version":"16.0.11026.1 commit:87122b596f240c8c819a194d8f57eb6c749483b9"}}}
-> (C) {"command":"setExceptionBreakpoints","arguments":{"filters":["all","user-unhandled"]},"type":"request","seq":4}
<- (R) {"seq":7,"type":"response","request_seq":3,"success":false,"command":"handshake","message":"Error processing 'handshake' request. Unknown Error: 0x89720010"}
<- (R) {"seq":8,"type":"response","request_seq":4,"success":true,"command":"setExceptionBreakpoints"}
-> (C) {"command":"configurationDone","type":"request","seq":5}
<- (E) {"seq":9,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/CommandFailed","data":{"VS.Diagnostics.Debugger.vsdbg.AdapterId":"coreclr","VS.Diagnostics.Debugger.vsdbg.ErrorCode":17001,"VS.Diagnostics.Debugger.vsdbg.Distribution.Name":"antergos","VS.Diagnostics.Debugger.vsdbg.Command":"handshake","VS.Diagnostics.Debugger.vsdbg.OSFamily":"Linux","VS.Diagnostics.Debugger.vsdbg.Version":"16.0.11026.1 commit:87122b596f240c8c819a194d8f57eb6c749483b9"}}}
<- (E) {"seq":10,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/DebugCompleted","data":{"VS.Diagnostics.Debugger.vsdbg.AdapterId":"coreclr","VS.Diagnostics.Debugger.vsdbg.DebugCompleted.BreakCounter":0,"VS.Diagnostics.Debugger.vsdbg.Distribution.Name":"antergos","VS.Diagnostics.Debugger.vsdbg.OSFamily":"Linux","VS.Diagnostics.Debugger.vsdbg.Version":"16.0.11026.1 commit:87122b596f240c8c819a194d8f57eb6c749483b9"}}}
<- (R) {"seq":11,"type":"response","request_seq":5,"success":false,"command":"configurationDone","message":"Error processing 'configurationDone' request. Unknown Error: 0x89720010"}
-> (C) {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":6}
-> (C) {"command":"threads","type":"request","seq":7}
<- (E) {"seq":12,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/DebugCompleted","data":{"VS.Diagnostics.Debugger.vsdbg.AdapterId":"coreclr","VS.Diagnostics.Debugger.vsdbg.DebugCompleted.BreakCounter":0,"VS.Diagnostics.Debugger.vsdbg.Distribution.Name":"antergos","VS.Diagnostics.Debugger.vsdbg.OSFamily":"Linux","VS.Diagnostics.Debugger.vsdbg.Version":"16.0.11026.1 commit:87122b596f240c8c819a194d8f57eb6c749483b9"}}}
@CTJansson are you using a version of VS Code which was built by someone other than Microsoft? (non-official copy)
Do you have the package "msbuild-stable" installed @CTJansson? I've had issues in some projects when that package isn't installed.
The issue that @CTJansson is running into is this --
{"seq":7,"type":"response","request_seq":3,"success":false,"command":"handshake","message":"Error processing 'handshake' request. Unknown Error: 0x89720010"}
This either means that @CTJansson is using an unofficial version of VS Code, or VS Code is failing to process this request.
@gregg-miskelly well, it seems I did, I installed the one from arch repository (this is the one causing problems), checked if AUR had a package and sure it did, that one works, so the issue can be closed again.
Thanks for the help though, never had a thought on checking AUR for vscode when it was in the official repo.
(Note for others incl myself, don't install vs code from arch repo, install the one from AUR)
(archlinux packager here)
Yeah, I am sorry but we are sane people so we run vscode with the electron already installed on your system, we don't package a new copy of electron specifically to run vscode (electron is huge btw). I already had a conversation with the upstream but they won't fix it, because they don't want, really. I guess it bothers them to much to spend a few hours tracking down here they are mishandling the spawning of new instances. Please open an issue with vscode's upstream, if people don't bother them this won't ever get fixed. This is what it looks when Microsoft opensources something.
@FFY00, I'd love to use the arch packaged vscode, not the Microsoft packaged one in AUR. If for nothing else, for the updates.
What is the exact thing stopping vsdbg from working with arch packaged vscode?
I thought it was https://aka.ms/VSCode-DotNet-DbgLicense. But please correct me if I'm wrong.
I explain the reason it doesn't work in the comment above.
Does it really not work because arch uses the system electron instead of the bundled one? That sounds unlikely.
To me, it sounds more likely that Microsoft signs something in their own vscode releases, so that vsdbg can detect whether it's "authentic" or not. Or some similar method.
VS Code doesn't handle respawns properly when called using the electron binary. If you want to try it yourself you can confirm it is working by compiling vscode yourself. Microsoft is not being stuborn, they are just ignoring the community because that doesn't give them instant PR publicity.
Oh, thanks for the explanation. I misunderstood, I was talking about a different issue, my bad.
Most helpful comment
@gregg-miskelly well, it seems I did, I installed the one from arch repository (this is the one causing problems), checked if AUR had a package and sure it did, that one works, so the issue can be closed again.
Thanks for the help though, never had a thought on checking AUR for vscode when it was in the official repo.
(Note for others incl myself, don't install vs code from arch repo, install the one from AUR)