cmyr / cargo-instruments

A cargo plugin to generate Xcode Instruments trace files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

source viewer problem

peter7891 opened this issue · comments

Hello,

I have the problem where the source viewer only works for main.rs and any other code is unavailable.

1.36 s   99.8%	0 s	 	           foo_rs::main::he70bb0403010c57b
1.36 s   99.4%	540.00 ms	 	          vm::VM::run::h17ad8734cf0cc68c
1.00 ms    0.0%	1.00 ms	 	          _$LT$vm..Object$u20$as$u20$core..clone..Clone$GT$::clone::h54aee501194c726f
1.00 ms    0.0%	1.00 ms	 	          core::option::Option$LT$T$GT$::expect::hbe2c0641a3e2d7e0
1.00 ms    0.0%	1.00 ms	 	          core::slice::_$LT$impl$u20$$u5b$T$u5d$$GT$::get::h5d5c173e759664a6
1.00 ms    0.0%	1.00 ms	 	          alloc::vec::Vec$LT$T$C$A$GT$::push::hf5b5c1b6053794b4
1.00 ms    0.0%	1.00 ms	 	          core::option::Option$LT$T$GT$::expect::h21b34825060683ed

The error is can't find source code for selected symbol

I tried this with one of my other projects, it works for the other project but not this one.
This is very weird.

The only difference between the 2 projects is, the one that is not working is a workspace with multiple crates.

to be honest I'm really not sure how this feature works; I imagine that the debug symbols for the binary include a source map, and maybe the paths are wrong in the context of a workspace?