Closed MakoPhil closed 4 years ago
ciao @MakoPhil
for the second, I can suggest you an idea:
see our Dockerfile for an idea of this: https://github.com/monostream/code-server/blob/develop/Dockerfile
and yes... I feel you because the .net core debug story - unsure if this project can do something without the support of microsoft. jetbrains had the same issue in rider - and worked around somehow: see here https://blog.jetbrains.com/dotnet/2017/06/16/rider-eap-23-net-core-debugger-back-code-cleanup/
Thanks for the response, @adrianliechti! I did not know about that extension so thanks for introducing me to it. I'll keep an eye on this project, without .NET Core debugging it's not much use to me I'm afraid, but who knows, maybe Microsoft will take an interest down the line.
Very disappointed with the lack of debugging on netcore. Can you work that out, like jetbains did?
Jetbrains made their own .NET Core debugger, see comments here -https://blog.jetbrains.com/dotnet/2017/02/23/rider-eap-18-coreclr-debugging-back-windows/
Perhaps they could elaborate on this.
Microsoft limit it? So bad.
What does this error mean? The C# extension for Visual Studio Code includes the Microsoft .NET Core Debugger (vsdbg). Unlike VS Code, and most other parts of the .NET Core Ecosystem, vsdbg is not an open source product but rather is a proprietary part of Visual Studio. It is licensed to work only with IDEs from Microsoft -- Visual Studio Code, Visual Studio, or Visual Studio for Mac. Visual Studio Code has an official version distributed by Microsoft but it is also an open source project, so anyone can build and distribute their own version. The C# extension itself along with the C# and Razor language services will work correctly with a VS Code distribution based on the OSS project. However, the debugger is only licensed to work with the Microsoft-distributed version of Visual Studio Code.
I'm using https://github.com/Samsung/netcoredbg Here's a little exmaple on how to use it. https://github.com/VSCodium/vscodium/issues/82#issue-409806641
I don't think we can support this. I do suggest @wowaz's solution though.
Vscode natively supports this now (incl. debugging) https://code.visualstudio.com/docs/remote/remote-overview
Vscode natively supports this now (incl. debugging) https://code.visualstudio.com/docs/remote/remote-overview
We only have their changes in GH-857 though, its not yet merged in mainline @Alumniminium
@MakoPhil oh btw before I forget, try out the v2 branch to see if .NET Core works.
Vscode natively supports this now (incl. debugging) https://code.visualstudio.com/docs/remote/remote-overview
We only have their changes in GH-857 though, its not yet merged in mainline @Alumniminium
I don't even get how this project is different from VSC Remote... I just replaced code-server with it and it works the same from what I can tell.
@Alumniminium VSC Remote isn't open source from what I can tell, but we do use the new VSCode Web variation which is totally different from VSC Remote (it does use VSCR internals but we serve a entire cloud IDE).
I tested this Samsung Debugger and it works - but sadly the C# extension does not let you define this pipeTransport as it's default.
If you have a look at the docker file: https://github.com/monostream/code-server/blob/develop/Dockerfile
# Setup the Environment for .NET
ENV DOTNET_CLI_TELEMETRY_OPTOUT "true"
ENV MSBuildSDKsPath "/usr/share/dotnet/sdk/2.2.402/Sdks"
ENV PATH "${PATH}:${MSBuildSDKsPath}"
# Setup .NET Core Extension
RUN mkdir -p ${VSCODE_EXTENSIONS}/csharp \
&& curl -JLs https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-vscode/vsextensions/csharp/latest/vspackage | bsdtar --strip-components=1 -xf - -C ${VSCODE_EXTENSIONS}/csharp extension
# Download the Samsung Debugger
RUN curl -sL https://github.com/Samsung/netcoredbg/releases/download/latest/netcoredbg-linux-master.tar.gz | tar -zx -C /home/coder
ENV PATH "${PATH}:/home/coder/netcoredbg"
In launch options of a c# project, set the pipetransport to use this debugger.
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/netcoreapp2.2/project.dll",
"args": [],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false,
"pipeTransport": {
"pipeProgram": "bash",
"pipeArgs": [
"-c"
],
"debuggerPath": "/home/coder/netcoredbg/netcoredbg",
"quoteArgs": true
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
I tested this Samsung Debugger and it works - but sadly the C# extension does not let you define this pipeTransport as it's default.
If you have a look at the docker file: https://github.com/monostream/code-server/blob/develop/Dockerfile
# Setup the Environment for .NET ENV DOTNET_CLI_TELEMETRY_OPTOUT "true" ENV MSBuildSDKsPath "/usr/share/dotnet/sdk/2.2.402/Sdks" ENV PATH "${PATH}:${MSBuildSDKsPath}" # Setup .NET Core Extension RUN mkdir -p ${VSCODE_EXTENSIONS}/csharp \ && curl -JLs https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-vscode/vsextensions/csharp/latest/vspackage | bsdtar --strip-components=1 -xf - -C ${VSCODE_EXTENSIONS}/csharp extension # Download the Samsung Debugger RUN curl -sL https://github.com/Samsung/netcoredbg/releases/download/latest/netcoredbg-linux-master.tar.gz | tar -zx -C /home/coder ENV PATH "${PATH}:/home/coder/netcoredbg"
In launch options of a c# project, set the pipetransport to use this debugger.
{ // Use IntelliSense to find out which attributes exist for C# debugging // Use hover for the description of the existing attributes // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md "version": "0.2.0", "configurations": [ { "name": ".NET Core Launch (console)", "type": "coreclr", "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. "program": "${workspaceFolder}/bin/Debug/netcoreapp2.2/project.dll", "args": [], "cwd": "${workspaceFolder}", // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console "console": "internalConsole", "stopAtEntry": false, "pipeTransport": { "pipeProgram": "bash", "pipeArgs": [ "-c" ], "debuggerPath": "/home/coder/netcoredbg/netcoredbg", "quoteArgs": true } }, { "name": ".NET Core Attach", "type": "coreclr", "request": "attach", "processId": "${command:pickProcess}" } ] }
Really interesting workaround. We'll try to fix this on our end so its easier to work with C# people. I know a lot of C# developers would like to use code-server for this.
any one manages to make samsung .NET Core debugger with dockerized environment ? I cannot make it work, if anyone has a config file that work out I would be very grateful
Regarding the original issue, we can't use the .NET debugger due to licensing issues.
I spun this up and had a quick go, love the potential here. Could be just the justification I need for a powerful dev box sitting in a cupboard... ;)
One dealbreaker though, and I'm not sure this is something that can be resolved from this end is that the .NET debugger is not licensed for use with anything non-Microsoft. The following notification pops up when I try:
Furthermore, I'm working with an Angular frontend, how would debugging work for that? Would a local browser tab directed at the server debug instance latch on to the IDE debugger?
Thanks and keep up the good work, I'm keen to see where this goes!