macos上VS Code上配置Python、Java、C++环境变量

简介: macos上VS Code上配置Python、Java、C++环境变量

macos上VS Code上配置Python、Java、C++环境变量

首先打开设置

然后在搜索框输入set,去编辑settings.json文件

下面是我本机上的配置文件,记录一下。

然后vs code上安装Code Runner插件就可以写cpp、java、py文件去跑了

{
    "workbench.colorTheme": "Visual Studio Light - C++",
    "auto-close-tag.disableOnLanguage": [
    ],
    // 这里的path填写本机的jdk的位置
    "java.configuration.runtimes": [
        {
          "name": "JavaSE-18",
          "path": "/usr/local/java/jdk-18.0.2.jdk/Contents/Home",
          "default": true
        }
    ],
    "java.showBuildStatusOnStart.enabled": "notification",
    "tabnine.experimentalAutoImports": true,
    "code-runner.languageIdToFileExtensionMap": {
      "bat": ".bat",
      "powershell": ".ps1",
      "typescript": ".ts"
    },
    "python.pythonPath": "python3",
      // Code Runner执行Python代码(⌘R) //
  "code-runner.executorMap": {
    "python": "python3",
  },
  // Whether to save the current file before running.
  "code-runner.saveFileBeforeRun": true, // run code前保存
  // Whether to save the current file before running.
  "code-runner.runInTerminal": true, // 设置成false会在"OUTPUT"中只读输出,无法输入数据
  // Whether to preserve focus on code editor after code run is triggered.
  "code-runner.preserveFocus": false, // 若为false,run code后光标会聚焦到终端上。如果需要频繁输入数据可设为false
  // Whether to clear previous output before each run.
  "code-runner.clearPreviousOutput": true, // 每次run code前清空属于code runner的终端消息,默认false
  // Whether to ignore selection to always run entire file.
  "code-runner.ignoreSelection": false, // 只跑选中的n行代码
    "cmake.configureSettings": {
    }
}


相关文章
|
9月前
|
Java 开发工具
【Azure Storage Account】Java Code访问Storage Account File Share的上传和下载代码示例
本文介绍如何使用Java通过azure-storage-file-share SDK实现Azure文件共享的上传下载。包含依赖引入、客户端创建及完整示例代码,助你快速集成Azure File Share功能。
612 6
|
10月前
|
jenkins Shell 测试技术
|
10月前
|
安全 jenkins Java
Java、Python、C++支持jenkins和SonarQube(一)
Jenkins 是一个开源的 持续集成(CI)和持续交付(CD) 工具,用于自动化构建、测试和部署软件项目。它基于 Java 开发,支持跨平台运行,并拥有丰富的插件生态系统,可以灵活地扩展功能
557 5
|
10月前
|
jenkins Java Shell
Java、Python、C++支持jenkins和SonarQube(全集)
Jenkins 是一个开源的持续集成(CI)和持续交付(CD)工具,用于自动化构建、测试和部署软件项目。它基于 Java 开发,支持跨平台运行,并拥有丰富的插件生态系统,可以灵活地扩展功能
843 1
|
10月前
|
jenkins Java 持续交付
Java、Python、C++支持Jenkins和SonarQube(三)
Python与Jenkins和SonarQube
505 1
|
10月前
|
jenkins Java 测试技术
|
算法 Serverless 数据处理
从集思录可转债数据探秘:Python与C++实现的移动平均算法应用
本文探讨了如何利用移动平均算法分析集思录提供的可转债数据,帮助投资者把握价格趋势。通过Python和C++两种编程语言实现简单移动平均(SMA),展示了数据处理的具体方法。Python代码借助`pandas`库轻松计算5日SMA,而C++代码则通过高效的数据处理展示了SMA的计算过程。集思录平台提供了详尽且及时的可转债数据,助力投资者结合算法与社区讨论,做出更明智的投资决策。掌握这些工具和技术,有助于在复杂多变的金融市场中挖掘更多价值。
647 12
|
Java Windows
【Azure Function】部署Java Function失败:报错deploy [ERROR] Status code 401和警告 'China North 3' may not be a valid region
1:deploy [ERROR] Status code 401, (empty body). 2: China North 3 may not be a valid region,please refer to https://aka.ms/maven_function_configuration#supported-regions for values. 3:  <azure.functions.maven.plugin.version>1.36.0</azure.functions.maven.plugin.version>
516 11
|
Java Maven Android开发
【Azure Developer】VS Code打包Java maven Project 遇见 BUILD FAILURE
Unknown lifecycle phase "lean". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>
767 5
|
C++ Python
探索Python与C/C++混合编程的艺术
探索Python与C/C++混合编程的艺术
631 1

推荐镜像

更多