vscodium: C# extension's debugging does not work 0x89720010
- Install Microsoft’s C# extension;
- Create a folder with a Hello World C# program and build it;
- Debug with the default Microsoft .NET Core Debugger (vsdbg) launch.json.
This message shows, and then nothing happens:
-------------------------------------------------------------------
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.
-------------------------------------------------------------------
#71 https://github.com/dotnet/core/issues/505 https://github.com/OmniSharp/omnisharp-vscode/issues/2491
Fix:
-
Easy Install
omnisharp-vscode+netcoredbg
extension (open-vsx.org) [src] -
⚠️Doesn’t work anymore⚠️ Advanced
- Get https://github.com/Samsung/netcoredbg/
- Edit “/your_proj_name/.vscode/launch.json”
windows:
{ "version": "0.2.0", "configurations": [ { "name": ".NET Core Launch (console)", "type": "coreclr", "request": "launch", "preLaunchTask": "build", "program": "${workspaceFolder}/bin/Debug/netcoreapp_your_ver/your_proj_name.dll", "args": [], "cwd": "${workspaceFolder}", "console": "integratedTerminal", "stopAtEntry": false, "internalConsoleOptions": "openOnSessionStart", "pipeTransport": { "pipeCwd": "${workspaceFolder}", "pipeProgram": "cmd", "pipeArgs": ["/c"], "debuggerPath": "C:\\\"Portable Bin\"\\netcoredbg\\netcoredbg.exe", "quoteArgs": true } } ,] }
linux, change this:
"pipeProgram": "bash", "pipeArgs": ["-c"], "debuggerPath": "/home/your_user_name/bin/netcoredbg/netcoredbg",
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 22
- Comments: 16 (3 by maintainers)
Hi @Harvzor I think this problem is not in VSCodium or plugin omnisharp-vscode. Problem in Microsoft license https://github.com/dotnet/core/issues/505 . VSCodium community is not obliged to keep track of all plugins/licenses/etc, if you don’t read the license terms, this is your problem.
Microsoft .NET Core Debugger (vsdbg) is not an open source product! Please read https://aka.ms/VSCode-DotNet-DbgLicense or alt URL.
@stripedpajamas Due to license restrictions, some plugins/libs are not supported and fully work only in VSCode(proprietary binary from Microsoft) … but this is obvious …
It’s great that there’s a well documented issue for this. However, this is a deal breaker when it comes to Codium.
I can’t expect my whole team to switch to using
netcoredbg
just because I want to run Codium (assuming I understand this solution correctly). It’s a shame they forced the more official solution to only work with Code.I’d prefer if this issue was highlighted in the
README.md
so others like me don’t end up wasting some time on this issue.I guess I’ll have to stick to Code. Thanks for the work otherwise!
As I am preparing to create a debugger extension for MonoDevelop based on Samsung debugger, I came across this thread (which of course is very valuable).
But I’d like to raise a concern that merely use
pipeTransport
settings as the first post indicated, might not fully resolve the licensing issue.OmniSharp not only downloads Microsoft’s debugger (vsdbg), but also downloads other supporting files (like vsdbg-ui). When
pipeTransport
is used, I suspect that vsdbg-ui is still used by OmniSharp, which can still lead to a licensing issue (vsdbg does check if it runs by a valid IDE, but vsdbg-ui does not). Maybe the ultimate solution is to patch OmniSharp to use netcoredbg instead of vsdbg-ui.Thanks for trying it out @Harvzor and thank you for your comment. I agree and will put a note in the README to hopefully save others from wasting any time 👍
Hi @ExceptionGit 👋
Thank you for this info!! Can you explain it a little more in-depth? Here is what I concluded, let me know where I am wrong:
Follow-up questions:
Thanks again for sharing this workaround 👍
Okay, so I tried this on a fresh machine with Manjaro. Installed VS Code and VS Codium (both v1.68). On VS Code I installed the official extension, and on VS Codium I installed the
omnisharp-vscode+netcoredbg
extension you linked (both v1.25). I tried debugging the same project in each one. I expect to get a debug terminal where I can interact with my program (e.g., so I can respond toConsole.ReadLine()
).VS Code
launch.json
Screenshot
Project gets built in one terminal. As required, a separate terminal opens and runs
vsdbg
, and I can interact with the application in this terminal.VS Codium
launch.json
Notice that my
debuggerPath
option points to thenetcoredbg
binary installed with the extension, like you suggest.Screenshot
Project gets built in one terminal. No new terminal opens to launch
netcoredbg
, so I can’t interact with the programAnalysis
Since
vsdbg
seems to be using some pipe files or something like that in/tmp
, I checked to see ifnetcoredbg
was doing something similar. Sure enough, the below files appeared after choosing “Run > Start Debugging” in VS Codium.I thought maybe I could troubleshoot this by connecting to these pipes with
netcoredbg
manually, similar to what VS Code does automatically forvsdbg
. But I couldn’t figure out how to use them.vsdbg
is using a--connection
command line option to connect to its pipes, andnetcoredbg
doesn’t have this option.Any ideas how I can properly debug this with
netcoredbg
? If this is veering into the realm of a new issue, I’m happy to open one. Just wanted to start here since people here have obviously gotten the debugger working for them.Hi! Unless I’m missing something, these instructions do eliminate the original issue: F5 now runs without errors. But any breakpoints are ignored! The only way I can step through the code is by setting “stopAtEntry”: true because all the breakpoints I set are simply ignored when starting the aforementionned debuging launch profile.
I’m on latest patched win10 x64 , vscodium, c# extension, dotnetcore sdk and samsung debugger relases
thanks in advance ubidev
Awesome 👍
I will put this into a snippet on the Docs page for future reference. Thanks @ExceptionGit