Replies: 1 comment
-
Which debugger should I use?
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Firstly, determine whether the issue lies within purely
homotopy-core
, or if it involveshomotopy-web
. It might be the case that it's easy to trigger the bug from the web interface, and for all intents and purposes in this sense it involveshomotopy-web
(even if the faulty behaviour only occurs inhomotopy-core
).Rust has standard debugging via DWARF (so you can use
gdb
,lldb
, etc.), but not when compiled forwasm32-unknown-unknown
. The principal idea is to build all the parts of the project for your native target (e.g.x86_64-unknown-linux-gnu
), as onlyyew
depends on a WASM target.Doesn't involve
homotopy-web
homotopy-rs/homotopy-core/tests/mytest.rs
;cargo test
: this generates a binary inhomotopy-rs/targets/debug/deps/mytest-.*
;Involves
homotopy-web
Here, we will build the model part of
homotopy-web
without the UI part, so it can run natively (and hence we can debug it).(the highlighted
Action
needs to be recreated in Rust code);homotopy-web
runcargo test action --no-run
to build the debug binary (this will need to be repeated each time you editaction.rs
);HOMOTOPY_IMPORT=/path/to/exported/workspace.hom targets/debug/deps/action-.* --ignored
in your debugger.Beta Was this translation helpful? Give feedback.
All reactions