goland修改使用内存设置及不生效解决办法

找了网上多个修改配置都不生效,最后在安装目录C:\Program Files\JetBrains\GoLand 2021.3.3\bin下看到goland.bat如下代码,直接复制出来保存为bat文件,在代码最后加一条echo %VM_OPTIONS_FILE%查看他的真实配置文件是在哪,再根据echo的文件路径去修改-Xms2048m -Xmx10240m 这2个值

SET BITS=64
SET VM_OPTIONS_FILE=
SET USER_VM_OPTIONS_FILE=
IF NOT "%GOLAND_VM_OPTIONS%" == "" (
  :: 1. %_VM_OPTIONS%
  IF EXIST "%GOLAND_VM_OPTIONS%" SET "VM_OPTIONS_FILE=%GOLAND_VM_OPTIONS%"
)
IF "%VM_OPTIONS_FILE%" == "" (
  :: 2. \bin\[win\].vmoptions ...
  IF EXIST "%IDE_BIN_DIR%\goland%BITS%.exe.vmoptions" (
    SET "VM_OPTIONS_FILE=%IDE_BIN_DIR%\goland%BITS%.exe.vmoptions"
  ) ELSE IF EXIST "%IDE_BIN_DIR%\win\goland%BITS%.exe.vmoptions" (
    SET "VM_OPTIONS_FILE=%IDE_BIN_DIR%\win\goland%BITS%.exe.vmoptions"
  )
  :: ... [+ .vmoptions (Toolbox) || \.vmoptions]
  IF EXIST "%IDE_HOME%.vmoptions" (
    SET "USER_VM_OPTIONS_FILE=%IDE_HOME%.vmoptions"
  ) ELSE IF EXIST "%APPDATA%\JetBrains\GoLand2021.3\goland%BITS%.exe.vmoptions" (
    SET "USER_VM_OPTIONS_FILE=%APPDATA%\JetBrains\GoLand2021.3\goland%BITS%.exe.vmoptions"
  )
)
echo %VM_OPTIONS_FILE%

你可能感兴趣的:(goland修改使用内存设置及不生效解决办法)