Debugger variables panel is very slow

⚓ Rust    📅 2026-06-29    👤 surdeus    👁️ 3      

surdeus

I use VS Code for debugging, and noticed that updating variables takes more than half a minute. It usually times out and then runs ok on the second attempt.

I wonder what can be the reason?

The sub-crate (inside a workspace) became heavy when bincode and zerocopy derive macros met together in some structs. Saving the file is slow, although it doesn't time out.

Is this because of rust analyzer slowdown, or is there any other reason?

update: I removed the 3-4 zerocopy derives. Editing and saving is a bit better. But running the debugger suffers the same way. Actually, after launching, things are fast, it comes to a breakpoint almost instantly. It's just the variables panel that take ages to load the data.

update2: what could be a cause is that I ran a profiler, and could have changed things. 1) /proc/sys/kernel/perf_event_paranoid was changed. I set it back to value 4 that was originally - no effect. 2) a setting in cargo.toml of the sub-crate: [profile.release] debug=2. This I think had no effect. Removing it hadn't either. 3) just a bad crate? I had added indicatif, but removing it changed nothing.

update3: I walked through code and removed the zerocopy derive macros where they were together with bincode. It made rust analyzer process everything much quicker on save. But the variables panel is still refreshes very slowly (it times out the first time).

I have no other var/watch expression in debugger, and just 1 breakpoint.

update4: I rebooted, and now it's broken completely: the debugger doesn't start at all, showing me this:

/home/culebron/.vscode/extensions/vadimcn.vscode-lldb-1.11.5/adapter/codelldb terminal-agent --connect=43261
Error: No such file or directory (os error 2)```

1 post - 1 participant

Read full topic

🏷️ Rust_feed