godot-rust / gdnative-book

The user guide for godot-rust.
https://godot-rust.github.io/book
MIT License
64 stars 42 forks source link

Create debugging.md #112

Closed ogapo closed 1 year ago

ogapo commented 1 year ago

added a basic summary of debug setup assuming VSCode IDE

Bromeon commented 1 year ago

Thanks a lot!

Edit: I noticed we forgot the link in the summary page -- I added it on master. Also fixed a few more things like "macOS", formatting etc.

ogapo commented 1 year ago

@Bromeon I forgot to add

            "preLaunchTask": "rust: cargo build",

to the example so it will ensure the rust code is built up to date before launching the debugger. It works as written, but I think that's probably the behavior most people would likely expect. Not sure it's worth a PR if you wanna make that update or not.

Bromeon commented 1 year ago

Added it; is it good the way it is deployed now? https://godot-rust.github.io/book/gdext/advanced/debugging.html

ogapo commented 1 year ago

I've been messing with my own some today. I ended up adding "sourceLanguages": ["rust"], and commenting out both the -e and -w argument. "-e" seems to prevent LLDB from being able to trigger some breakpoints, but I'm not sure why. The same breakpoints hit ok without the -e though. I think it may be something to do with how we are trapping Rust panics rather than letting them signal but I couldn't figure out how.