fragcolor-xyz / shards

High-performance, multi-platform, type-safe programming language designed for visual & AI assisted development
BSD 3-Clause "New" or "Revised" License
68 stars 14 forks source link

Review debug documentation #392

Open guusw opened 2 years ago

guusw commented 2 years ago

https://docs.fragcolor.xyz/contribute/code/getting-started/

The contribute docs don't contain much info about how to debug shards and what tools best to use.

Clearly describe the process and tools for debugging on:

guusw commented 2 years ago

Hey team! Please add your planning poker estimate with Zenhub @Kryptos-FR @sinkingsugar

sinkingsugar commented 2 years ago

Windows (clang) is not a supported platform.

sinkingsugar commented 2 years ago

Seriously this is not a priority, this is something trivial that has no step related to Shards...

On windows and linux use gdb, just like you'd do with any gcc compiled binary. On Mac use lldb. build with -DCMAKE_BUILD_TYPE=Debug.

Anything else is your own mileage and your own setup that has nothing to do with Shards.

sinkingsugar commented 2 years ago

Also as long as you use gnu toolset rust will be debuggable with gdb just fine. So rust is not an excuse.

Kryptos-FR commented 2 years ago

Seriously this is not a priority, this is something trivial that has no step related to Shards...

On windows and linux use gdb, just like you'd do with any gcc compiled binary. On Mac use lldb. build with -DCMAKE_BUILD_TYPE=Debug.

Anything else is your own mileage and your own setup that has nothing to do with Shards.

I disagree. We do need some internal documentation on the subject. I spent a full day trying to debug shards and couldn't make it work. It was either not hitting the breakpoint, not breaking upon exception or when doing so it was only showing assembly code. And yes I did have the DEBUG build.

Maybe it is evident for you but it isn't for me and I would rather not waste another day on it. Having some reference documentation to rely upon would certainly make it less painful.

sinkingsugar commented 2 years ago

And I'm surprised you didn't have a debug setup yet.