Cosmos icon indicating copy to clipboard operation
Cosmos copied to clipboard

"Exception: System.Exception: Native code encountered, plug required. Check build output for more information." when trying to use Exception.StackTrace or Exception.Source

Open hkh777uk opened this issue 9 months ago • 11 comments

What is the usecase for this plug Debugging errors. Stack traces and sources are very important when it comes to debugging, as they indicate where an error is coming from.

Complexity of plug I don't know, I'm not very familiar with machine code and binaries and things like that.

Describe alternatives you've considered I don't know of any alternatives I can use, since the normal debugger just gives me memory addresses, which aren't very useful.

Additional context I just want to be able to use Exception.StackTrace and Exception.Source, and any other methods and properties that are affected.

hkh777uk avatar Feb 17 '25 15:02 hkh777uk

Have you checked that Cosmos.Plugs is present in the csproj?

Gabolate avatar Feb 17 '25 15:02 Gabolate

And for normal debugging i would just use 'try catch' statements

Gabolate avatar Feb 17 '25 15:02 Gabolate

Those may not be plugged as far as i know

Guillermo-Santos avatar Feb 17 '25 16:02 Guillermo-Santos

Have you checked that Cosmos.Plugs is present in the csproj?

This is what Visual Studio says

Image

hkh777uk avatar Feb 17 '25 17:02 hkh777uk

Those may not be plugged as far as i know

I can use try-catch, but it won't give me a source or a stack trace, just the error

hkh777uk avatar Feb 17 '25 17:02 hkh777uk

do you have the devkit? you could search for the exception class plugs to see what actually work on that class

Guillermo-Santos avatar Feb 17 '25 17:02 Guillermo-Santos

Image

Guillermo-Santos avatar Feb 17 '25 18:02 Guillermo-Santos

That looks like it just means that you can't use those methods. Also, I just discovered this post which seems to be talking about the same thing: https://github.com/CosmosOS/Cosmos/issues/1851

hkh777uk avatar Feb 17 '25 18:02 hkh777uk

So right now it is not plugged

Guillermo-Santos avatar Feb 17 '25 18:02 Guillermo-Santos

I am just guessing, but for that property to work you would first need an implementation for the methods of the image

Guillermo-Santos avatar Feb 17 '25 18:02 Guillermo-Santos

Which is why I posted this, because I don't really understand how plugs work, other than that they are placeholders for features that haven't been implemented yet. So I probably can't implement them myself.

hkh777uk avatar Feb 17 '25 18:02 hkh777uk

You basicly could, but it would take some time and effort. Or just ouy also could Make plugs For it

randomusert avatar Feb 22 '25 20:02 randomusert

It's never been plugged.

9xbt avatar Mar 18 '25 17:03 9xbt