2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Debugger for Rust: FireDBG

Last updated at Posted at 2024-01-02

2024年のスタート。2024年も個人 blog を継続する。

FireDBG1 という Rust の Debugger を試す。

image.png

star-history_firedbg.png

tl;dr

  • 現時点で調べる限りでは、FireDBG は、Apple シリコンの影響で Dev Container で動かせない。Cloud Workstations2 で FireDBG を検証した。
  • info: completed FireDBG self tests このメッセージが表示されれば install は完了。
  • .ss というファイルが出力される。そのファイルを FireDBG で開くと、VS Code の画面で debug できる。

Environment

  • Cloud Workstations
    • OS
      • Ubuntu 20.04.6 LTS
    • Rust
      • cargo 1.74.1 (ecb9851af 2023-10-18)
      • rustc 1.74.1 (a28077b28 2023-12-04)
      • rustup 1.26.0 (5af9b9484 2023-04-05)
    • IDE
      • Code-OSS

Getting Started3

user@rust:~/FireDBG.Rust.Testbench$ curl https://raw.githubusercontent.com/SeaQL/FireDBG.for.Rust/main/install.sh -sSf | sh
info: downloading FireDBG from `https://github.com/SeaQL/FireDBG.for.Rust/releases/download/1.74.2/x86_64-ubuntu20.04.tar.gz`
info: installing FireDBG binaries to `/home/user/.cargo/bin`
info: performing FireDBG self tests
     Tracing `firedbg.toml` config file not found, default settings will be applied
     Tracing debugger_self_test = { trace = "full" }
      Parsed 2 source files; re-cached 2 source files
   Compiling firedbg-lib v0.1.2
   Compiling debugger_self_test v1.74.2 (/home/user/.cargo/bin/firedbg-lib/debugger-self-test)
    Finished dev [unoptimized + debuginfo] target(s) in 1.76s
     Running `LD_LIBRARY_PATH="/home/user/.cargo/bin/firedbg-lib/lib" "/home/user/.cargo/bin/firedbg-debugger" "run" "/home/user/.cargo/bin/firedbg-lib/debugger-self-test/target/debug/debugger_self_test" "--workspace-root" "/home/user/.cargo/bin/firedbg-lib/debugger-self-test" "--output" "/home/user/.cargo/bin/firedbg-lib/debugger-self-test/output.firedbg.ss" "--package-name" "debugger_self_test" "--package" "./full"`
Testing call_chain
Testing for_range
Testing hash_map
Testing return_char
Testing return_enum
Testing return_value
Testing return_object
Testing return_option
Testing return_result
Testing return_struct
Testing return_pointer
Testing return_ref_mut
Testing fn_return
info: completed FireDBG self tests
user@rust:~/FireDBG.Rust.Testbench$
  • REST API の実装で使用した Axum のコードを使用。
user@rust:~/rust-api-samples-rocket/axum$ firedbg list-target
   Upgrading FireDBG version

Available binaries are:
        axum
user@rust:~/rust-api-samples-rocket/axum$
user@rust:~/rust-api-samples-rocket/axum$ firedbg run axum
     Tracing `firedbg.toml` config file not found, default settings will be applied
     Tracing axum = { trace = "full" }
      Parsed 13 source files; re-cached 5 source files
    Finished dev [unoptimized + debuginfo] target(s) in 0.17s
     Running `LD_LIBRARY_PATH="/home/user/.cargo/bin/firedbg-lib/lib" "/home/user/.cargo/bin/firedbg-debugger" "run" "/home/user/rust-api-samples-rocket/axum/target/debug/axum" "--workspace-root" "/home/user/rust-api-samples-rocket/axum" "--output" "/home/user/rust-api-samples-rocket/axum/firedbg/target/axum-1704180031405.firedbg.ss" "--package-name" "axum" "--package" "./full"`
user@rust:~/rust-api-samples-rocket/axum$

FireDBG に関する検証は以上。

BTW

FireDBG を M1 の VSCode Dev Container で動かす方法がまだ不明。

  1. https://firedbg.sea-ql.org/

  2. https://cloud.google.com/workstations/docs

  3. https://firedbg.sea-ql.org/blog/2023-12-13-getting-started/

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?