Ultimate IntelliJ 2020.3.2 with Rust 1.49.0 there is no values in debugger for anything beyond built in types

Answered

I cannot seem to be able to examine any values (beyond built-in) ones in 'Variables' tab in debugger. So in particular I cannot see content of the 'freqs' HashMap  or even see current value of loop variable 'word'. I tried different settings for Debugger/Data Views but no change. 

use std::collections::HashMap;

fn main() {
let text = "hello world hello";
let mut freqs = HashMap::new();
for word in text.split_whitespace() {
match freqs.get_mut(word) {
Some(value) => *value += 1,
None => {
freqs.insert(word, 1);
},
}
}
println!("Word frequencies: {:#?}", freqs);
}
0
7 comments

Hello,

Could you please add more information about this issue? What is shown in debug tool window?

0
text = {str*} 
freqs = {std::collections::hash::map::HashMap<str*, i32, std::collections::hash::map::RandomState>} size=1
base = {hashbrown::map::HashMap<str*, i32, std::collections::hash::map::RandomState>}
hash_builder = {std::collections::hash::map::RandomState}
k0 = {unsigned long long} 10314885699421269494
k1 = {unsigned long long} 5228807949838481551
table = {hashbrown::raw::RawTable<(str*, i32)>}
bucket_mask = {unsigned long long} 0
ctrl = {core::ptr::non_null::NonNull<u8>}
data = {core::ptr::non_null::NonNull<(str*, i32)>}
growth_left = {unsigned long long} 0
items = {unsigned long long} 0
word = {str*}
error = parent failed to evaluate: variable not available
0

error: module importing failed: No module named 'renderers'
File "temp.py", line 1, in <module>

error: 'jb_renderers_set_diagnostics_level' is not a valid command.
error: module importing failed: No module named 'renderers'
File "temp.py", line 1, in <module>

error: 'jb_renderers_loaders_add' is not a valid command.
error: the replacement path doesn't exist: "C:\Users\tom_n\.rustup\toolchains\1.43.0-x86_64-pc-windows-msvc\lib\rustlib\src\rust\"
Traceback (most recent call last):
File "C:/Users/tom_n/AppData/Roaming/JetBrains/IntelliJIdea2020.3/plugins/intellij-rust/prettyPrinters\lldb_lookup.py", line 90, in synthetic_lookup
return StdHashMapSyntheticProvider(valobj, dict)
File "C:/Users/tom_n/AppData/Roaming/JetBrains/IntelliJIdea2020.3/plugins/intellij-rust/prettyPrinters\lldb_providers.py", line 455, in __init__
self.update()
File "C:/Users/tom_n/AppData/Roaming/JetBrains/IntelliJIdea2020.3/plugins/intellij-rust/prettyPrinters\lldb_providers.py", line 490, in update
self.pair_type = table.type.template_args[0].GetTypedefedType()
TypeError: 'NoneType' object is not subscriptable

0
Thank you! There are two separate problems basically:
0

Thanks for links - so are you saying that those are well known issues and the xix is in the pipeline (since June 2020?). Btw - CLion debugger suppose to work correctly - I installed evaluation version and Rust debugger is actually slightly worse than on Ultimate IntelliJ. 

0

Could you please clarify "is actually slightly worse than on Ultimate IntelliJ" point?

0

Yes - there are case in which CLion reports "no variables to be shown" at all - and same case in IntelliJ hase at least some output. At this point I switched to VSCode for Rust - I will keep Ultimate IntelliJ for other languages. At least for a time. 

 

0

Please sign in to leave a comment.