Hacker News new | ask | show | jobs
by dcz_self 1065 days ago
You can use QtCreator that way already:

https://dorotac.eu/posts/debugging_rust/

You can view the data structures opaquely even though the functions are written not in Rust, but in Python.

One of the difficulties is that the Rust compiler will emit different debugging info depending on the compiler version. Perhaps I should look into how gdb deals with that (if at all).

Patches welcome.

1 comments

Wow, those long lines that don't break are a special kind of horror, in an article from 2023 no less. Am I glad there's Reader View.

But the contents is interesting. Bookmarked.

Which lines do you mean? This source code part?

> $1 = alloc::string::String {vec: alloc::vec::Vec<u8, alloc::alloc::Global> {buf: alloc::raw_vec::RawVec<u8, alloc::alloc::Global> {ptr: core::ptr::unique::Unique<u8> {pointer: core::ptr::non_null::NonNull<u8> {pointer: 0x5555555abaa0}, _marker: core::marker::PhantomData<u8>}, cap: 3, alloc: alloc::alloc::Global}, len: 3}}

On my browser, everything breaks according to the browser's window size (I set white-space: pre-wrap).

Don't know about the long lines, everything wraps well to me, but on mobile (firefox) the zero padding on the left side is brutal. The gigantic comment section at the end is a small hindrance, while the right sidebar kills 30-40% of the page width (on mobile), which is annoying on longer articles. And thanks for the content :-)
I've checked and saw that the site renders OK in Firefox, but in Safari the layout is totally broken. I guess it's a bug in Safari.
Thanks for the report. I don't have access to Safari, so there isn't much I can do right now :/