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.
-------------------------------------------------------------------
https://github.com/dotnet/core/issues/505
https://github.com/OmniSharp/omnisharp-vscode/issues/2491
Fix
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",
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 馃憤
Hi @stripedpajamas :wave:
* MS's C# extension only works with the VS Code productMS's C# extension works everywhere, but debugger from this extension only works with the :
Visual Studio Code, Visual Studio or Visual Studio for Mac
https://github.com/OmniSharp/omnisharp-vscode/issues/2846#issuecomment-461866197
https://github.com/OmniSharp/omnisharp-vscode/issues/2491#issuecomment-418811364
https://github.com/dotnet/core/issues/505
* Samsung also provides a C# debugger (?)Yes! https://github.com/Samsung/netcoredbg/blob/master/README.md
NetCoreDbg is a managed code debugger with MI interface for CoreCLR. The debugger provides GDB/MI or VSCode Debug Adapter protocol and allows to debug .NET apps under .NET Core runtime.
* If you edit the launch.json file in your project, you can get C# debugging using the Samsung debugger (?)Yes! https://github.com/Samsung/netcoredbg/issues/1#issuecomment-397981156
* Is this C# extension problem happening on Windows/Linux and not Mac? Or is it happening across all platforms?All platforms..
* Is there a similar workaround for C++ projects to help #71Maybe. I don't use c++, check this https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/ , no alternative. May help: How To Debug MIEngine.md and PipeTransport.md
Awesome 馃憤
I will put this into a snippet on the Docs page for future reference. Thanks @ExceptionGit
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!
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 @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 ..
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.
On Windows, trying to build netcoredbg requires VS 2017 Community.
I was able to build, but when call netcoredbg.exe I get
Debug Error!
Program: ...c\dotnetnetcoredbg\src\debugnetcoredbg\Debugnetcoredbg.exe
abort() has been called
(Press Retry to debug the application)
````
I was not able to build in Release(no target?) and cmake does not work (by default) with VS Build Tools.
So, debugging C# with vscodium on Windows requires Linux level power user skills and installing tracking software like VS 2017. And much of zeal to hope things will work, eventually....
@dzmitry-lahoda You can download binaries directly from GitHub, https://github.com/Samsung/netcoredbg/releases
What you got is expected as the debugger when launched would like to debug something but you don't give it the information. You might try to run netcoredbg --help if your goal is to verify whether you build it successfully.
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
Is doing this ok?
#!/bin/node
const fs = require('fs');
var filename = '/usr/lib/code/package.json'
var package_data = require(filename)
package_data.name = 'Code'
package_data.desktopName = 'code-url-handler.desktop'
fs.writeFileSync(filename, JSON.stringify(package_data));
var filename = '/usr/lib/code/product.json'
var product_data = require(filename)
product_data.nameShorta = 'Code'
product_data.nameLong = 'Visual Studio Code'
product_data.applicationName = 'code'
fs.writeFileSync(filename, JSON.stringify(product_data));
Most helpful comment
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
pipeTransportsettings 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
pipeTransportis 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.