在CLion中使用WSL工具链时如何启用生锈调试? [英] How to enable rust debugging when using WSL toolchain in CLion?

查看:212
本文介绍了在CLion中使用WSL工具链时如何启用生锈调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是rust的新手,现在我正在Windows上使用CLion和JetBrains的rust插件。当我只是编译并运行时,它运行良好。但是,当我开始调试时,即使我将工具链切换到WSL,它也会显示类似的对话框。

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.

我想知道WSL是否是一种GNU工具链。如果是的话,我应该怎么做才能启用锈调试?谢谢。

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

推荐答案

Rust提供了两种适用于Windows操作系统的第1层工具链 pc-windows-msvc pc-windows-gnu (用于 i686 x864_64 架构)总共4条工具链)。它们的区别在此处突出显示: GNU和MSVC Rust工具链之间有什么区别?

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要求您使用GNU工具链。使用Rustup,您可以安装它并将其设置为默认值(或在您选择的IDE中对其进行配置):

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

这篇关于在CLion中使用WSL工具链时如何启用生锈调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆