Thefrank / dotnet-freebsd-crossbuild

Bash script and patches for building dotNET for FreeBSD under Linux
31 stars 3 forks source link

Couldn't find a debug adapter descriptor for debug type 'coreclr' #8

Open BDisp opened 2 months ago

BDisp commented 2 months ago

I've installed the dotnet sdk 8.0.300 and I can build, run and test c# project. but I can´t debug on the Code-OSS. I get the bellow error. I've installed these extensions:

C# (Free/Libre C#)
.NET Install Tool

image

Debugging is not possible yet or I am failing something? Thanks.

Thefrank commented 2 months ago

What IDE and platform are you using? If you are running everything under FreeBSD, try the version from ports. That explicitly builds the diagnostics repo where as the crossbuild does not have the standard SOS items

EDIT: If using VSCode you might need to update it to version that supports the 8.0.3xx SDK

BDisp commented 2 months ago

I'm running GhostBSD on a VM with the Code - OSS version 1.88.1 installed. It's possible to install the official VSCode?

EDIT: On a Windows 11 host.

Thefrank commented 2 months ago

GhostBSD should be fine. However, for VSCode, Microsoft does not publish a version for FreeBSD :( The newest in ports is 1.90 https://www.freshports.org/editors/vscode/ but it does not list any items on the pkg mirrors 🤷

I have no idea how Code OSS deals with SDK compatibility but for most other things Microsoft bases this off of what version of MSBuild being used: https://learn.microsoft.com/en-us/dotnet/core/porting/versioning-sdk-msbuild-vs#lifecycle

BDisp commented 2 months ago

Probably only with the net90 this will be considered by the dotnet team. I also tried debug remotely using VSCode but without success, because VSCode only have 3 connections options (Linux, macOS, and Windows). It try to connect saying "Setting up SSH Host initializing VS Code Server" but never ends, perhaps trying install some binaries that is not compatible. I end up aborting it. I can connect from Windows with PowerShell through ssh, so I think isn't firewall issue on the GhostBSD.

EDIT: When I click in details it's waiting to input the passwords. After insert the password it say "Could not establish connection to 'host'".

Thefrank commented 2 months ago

Starting with dotNET9, the SDK is aware of FreeBSD-x64 (amd64) and FreeBSD-ARM64 (aarch64). This hopefully gives developers at bit of a nudge in getting their products to atleast know that FreeBSD exists :)

BDisp commented 2 months ago

In this case it won't take long for VSCode to do the same, as this would bring many advantages, such as using official MS tools. Of course there will always be specific extensions for FreeBSD, but at least the main ones officially supporting FreeBSD is advantageous. Speaking of VSCode, the package is no longer available in the repositories because they are having problems with compilation. There are those who say that it is on the blacklist, but I don't believe it, as I tried to compile it and I confirm that it is giving an error.

Thefrank commented 2 months ago

In this case it won't take long for VSCode to do the same, as this would bring many advantages, such as using official MS tools. Of course there will always be specific extensions for FreeBSD, but at least the main ones officially supporting FreeBSD is advantageous.

To be clear: The SDK will be FreeBSD aware but Microsoft still does not produce FreeBSD SDKs nor offer any support for FreeBSD using dotNET. It remains a "Community Supported" platform

Speaking of VSCode, the package is no longer available in the repositories because they are having problems with compilation. There are those who say that it is on the blacklist, but I don't believe it, as I tried to compile it and I confirm that it is giving an error.

If it is still in ports but not made into a package that usually means there is an error during build. A blacklist would be removed from ports

BDisp commented 2 months ago

To be clear: The SDK will be FreeBSD aware but Microsoft still does not produce FreeBSD SDKs nor offer any support for FreeBSD using dotNET. It remains a "Community Supported" platform

When I referred to MS I actually meant Community Supported by dotnet. So, rectifying, I think the dotnet team will provide SDKs for FreeBSD, correct?

If it is still in ports but not made into a package that usually means there is an error during build. A blacklist would be removed from ports

Thanks for the info.

Thefrank commented 2 months ago

When I referred to MS I actually meant Community Supported by dotnet. So, rectifying, I think the dotnet team will provide SDKs for FreeBSD, correct?

you can pkg install dotnet right now to get dotNET8.

It will not show up in a place like https://dotnet.microsoft.com/en-us/download/dotnet/9.0

As for VSCode:

Seems to be failing on electron (atleast for me): electron29-29.4.2.log

edit: looks like my swap was too small. trying with more ram and swap

edit 5hr later: pid 27597 (ninja), jid 3, uid 0, was killed: failed to reclaim memory 12GB RAM and 16GB swap. I am not going to try to build again and will just wait for the pkg on mirrors

sjsepan3 commented 2 months ago

@Thefrank : I had previously found an alternate way to obtain dotnet SDKs, via ... https://github.com/sec/dotnet-core-freebsd-source-build ...which I unpacked into ~/.dotnet and pointed to with the path...

dotnet info

After reading your suggestions above, I decided to try 'dotnet' once more in the Software Station for GhostBSD, but it did not seem to have a package called 'dotnet' or anything recent...

dotnet in software list

...and trying the command in bash also turned up nothing...

pkg install dotnet

...but although I can build / run console apps with that SDK, I also get the 'coreclr' message wen trying to debug in Code-OSS

Version: 1.88.1 Commit: e170252f762678dec6ca2cc69aba1570769a5d39 Date: 2024-05-07T13:49:21.988Z Electron: 28.3.1 ElectronBuildId: undefined Chromium: 120.0.6099.291 Node.js: 18.18.2 V8: 12.0.267.19-electron.0 OS: FreeBSD x64 14.0-STABLE

Thefrank commented 2 months ago

Does GhostBSD not use the FreeBSD pkg mirror? That might explain why there is no dotnet https://www.freshports.org/lang/dotnet/

sjsepan3 commented 2 months ago

Does GhostBSD not use the FreeBSD pkg mirror? That might explain why there is no dotnet https://www.freshports.org/lang/dotnet/

I assumed so. I do wonder sometimes, because while there is a lot in there, sometimes things people mention are not there. Myself, I cannot say.

Thefrank commented 2 months ago

https://pkg.ghostbsd.org/stable/FreeBSD:14:amd64/latest/packagesite.txz lists dotNET projects (e.g., the *arr series of applications) but not dotnet or dotnet8 so it looks like dotnet is not available on the GhostBSD platform at this time

sjsepan3 commented 2 months ago

https://pkg.ghostbsd.org/stable/FreeBSD:14:amd64/latest/packagesite.txz lists dotNET projects (e.g., the *arr series of applications) but not dotnet or dotnet8 so it looks like dotnet is not available on the GhostBSD platform at this time

Thanks for digging into that and clarifying! So, it's definite.