How to enable rust debugging when using WSL toolchain in CLion?

℡╲_俬逩灬. 提交于 2019-12-23 03:59:12

问题


I am new to rust and I am using CLion and the rust plugin from JetBrains on Windows now. It works well when I just compile and run. But when I start debugging, it shows a dialog like this even though I switch my toolchain to WSL.

I wonder whether WSL is a kind of GNU toolchain. And if it is, what should I do to enable rust debugging? Thanks.


回答1:


Rust provides two kinds of Tier 1 toolchains for the Windows operating system: pc-windows-msvc and pc-windows-gnu (for i686 and x864_64 architectures, making 4 toolchains in total). Their differences are highlighted here: What are the differences between the GNU and MSVC Rust toolchain?

WSL requires you to use the GNU toolchain. With Rustup, you can install it and make it the default (or configure it in your IDE of choice):

rustup toolchain add stable-x86_64-pc-windows-gnu
rustup default stable-x86_64-pc-windows-gnu


来源:https://stackoverflow.com/questions/53723438/how-to-enable-rust-debugging-when-using-wsl-toolchain-in-clion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!