我有这样的代码:
#[derive(Debug)]
struct Rectangle {
width: u32,
height: u32,
}
...我想深入了解Debug
.
在 IntelliJ IDEA 中,我将光标放在上面Debug
并按下cmd + b
导航到 Rust 源。
在 VSCode 中,我试图获得类似 IDEA 中的行为:
- 将光标放在同一个地方(
Debug
单词中间) - 打开右键菜单
- 按
Go to definition (F12)
或Go to Implementations(cmd + F12)
VSCode 向我显示 message No definition found for 'Debug'
。
有没有办法像在 IDEA 中一样在 VSCode 中设置源导航?
我在 VSCode 中使用了这个 Rust 扩展。