# IntelliJ IDEA 如何增加运行时候的内存

**URL:** <https://www.isharkfly.com/t/intellij-idea/13947>\
**Category:** 软件技术\
**Tags:** ide\
**Created:** [May 5, 2022, 9:03pm UTC](https://www.isharkfly.com/t/intellij-idea/13947 "2022-05-05T21:03:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [May 5, 2022, 9:03pm UTC](https://www.isharkfly.com/t/intellij-idea/13947/1 "2022-05-05T21:03:03Z")

</div>

如果你的 IntelliJ IDEA 在调试的时候越来越慢，那么时候需要增加 IntelliJ IDEA 使用的内存了。

通过 **Help** | **Edit Custom VM Options** 路径来打开 VM 的选项。

![IJ-vm-01](https://www.isharkfly.com/images/transparent.png)

IJ 将会使用自己的编辑器打开 .vmoptions 文件。

在这个文件中，你需要调整 `-Xmx` 参数，然后保存重启就可以了。

正常来说 IntelliJ IDEA 应该需要分配至少 4G 的内存。

![IJ-vm-02](https://www.isharkfly.com/images/transparent.png)

如果你配置的参数不够的话，那么就增加这个内存配置。
