Intellij Idea 2017 not reading idea64.vmoptions - intellij-idea

Using Ubuntu, i have both intellij 2016 and intellij 2017. I configure idea64.vmoptions for both in the respective folder: ~/.IntelliJIdea2016.3/ and /.IntelliJIdea2017.2. for both i upgraded the memory size. while 2016 version reads this value (as i see in the memory indicator), 2017 versions doesn't. I tried everything.
this is idea64.vmoptions:
-Xms2128m
-Xmx2750m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Dawt.useSystemAAFontSettings=lcd
-Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine

Rather than attempting to find the correct file on the file system you can do this from within the IDE from the menu item:
Help > Edit Custom VM Options
This will present the vmoptions file which is actually in use allowing your to edit it within the IDE. Once you have completed your edit, just restart IntelliJ and you'll see the changes take effect.
More details in the docs.

1、You can set it from here:
2、Open the edit page:
3、Then restart, it will take effect:

Related

-Dkotlinx.coroutines.debug not working in IntelliJ IDEA JVM options

I'm trying Kotlin's coroutines with official guide using IntelliJ IDEA on Mac OS. In this section there's an advice to use -Dkotlinx.coroutines.debug JVM option to get detailed log output. What I did is I opened 'Help/Edit custom VM options...' and in the opened idea.vmoptions file I added -Dkotlinx.coroutines.debug line.
idea.vmoptions content after edit:
# custom IntelliJ IDEA VM options
-Xms128m
-Xmx750m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Xverify:none
-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof
-Dkotlinx.coroutines.debug
But after running the code again the output is:
[main] I'm computing a piece of the answer
[main] I'm computing another piece of the answer
[main] The answer is 42
Process finished with exit code 0
Whereas expected output is:
[main #coroutine#2] I'm computing a piece of the answer
[main #coroutine#3] I'm computing another piece of the answer
[main #coroutine#1] The answer is 42
What am I missing here?
The Help > Edit custom VM options... menu option lets you set the VM options for the execution of IntelliJ itself.
To set the options for your own application, you need to edit the Run/Debug Configurations. These can be found under Run > Edit Configurations... in the menu.
Selecting this option opens the following window which lets you set the VM options for your application(s):

Intellij idea Heap size can not be changed

Someday, I run something huge, and a window pop up said that heap memory out of memory, I set it to 2014M in that window, then click continue. Everything was fine.
But I don't like the number 2014, I want it 2048. So, I changed -Xmx option in idea64.exe.vmoptions (like below) and restarted idea. (According to this doc) However, nothing was changed, heap size was still 2014M.
-Xms512m
-Xmx2048m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
Then, I changed all idea64.exe.vmoptions I could find, and restarted, and still failed.
OS: windows 10 64-bit
idea version: 2018.1
How can I change the heap size to 2048M ?
Please help, thanks.
update:
That day, I was debugging with some codes which encrypt some huge objects, and the popup showed just after I use copy value function.
I tried to change the heap size of IntelliJ Idea's JVM as the official document, but not working.
The heap memory statistic is here:
update 2:
The log:
2018-07-23 09:54:04,184 [ 224] INFO - #com.intellij.idea.Main - JVM Args: -Xms512m -Xmx2048m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Djb.vmOptionsFile=C:\Users\huayu\.IntelliJIdea2018.1\config\idea64.exe.vmoptions -Didea.jre.check=true -Dide.native.launcher=true -Didea.paths.selector=IntelliJIdea2018.1 -XX:ErrorFile=C:\Users\huayu\java_error_in_idea_%p.log -XX:HeapDumpPath=C:\Users\huayu\java_error_in_idea.hprof
Newer versions of IDEA use a different file for vm options. Older versions used to use C:\Program Files\JetBrains\IntelliJ IDEA {version}\bin\idea64.exe.vmoptions but now these configurations exist in C:\Users{user}.IntelliJIdea{version}\config\idea64.exe.vmoptions.
You can get to this file from IntelliJ. On the Help menu, click Edit Custom VM Options. Then restart IDEA and it should update.
Note: It doesn't look like the value displayed in the bottom right will exactly match what you specify in the config file. Not sure why.
See also: How to increase the memory heap size on IntelliJ IDEA?
After Hours and hours searching.
On windows 10
Control Panel => System => Advanced system settings
System Properties => Advanced
Environment Variebles
_JAVA_OPTIONS -Xmx8192M
You changed the heap size of the project you were running within IntelliJ, not the heap size of IntelliJ itself, when you got to that popup.
You would set that in the run configuration for your project.
The startup options change the heapsize of IntelliJ itself, which is not shown on screen constantly.
I have just realised that the memory indicator which is showing the values are coming from 32bit vmoptions file while I'm running the 64 bit idea. And hence the indicator is not showing the correct values.

IntelliJ IDEA error: cannot find vm options file

I'm trying to launch IntelliJ IDEA but the following error pops up:
Cannot find vm options file
This happened to me in Ubuntu 16.4, and the pycharm.vmoptions file was under the bin/ directory.
I was trying to run the shell script with this commands:
cd <path_to_pycharm_installation>/bin
source pycharm.sh
Running the bash script without the "source" command solved it for me:
./pycharm.sh
The explicit solution is to set an environment variable named $IDEA_VM_OPTION:
export IDEA_VM_OPTION="[path-to-'.vmoptions' file]"
Search in the file idea.sh:
grep -ri "vmoption" ./bin/idea.sh
You will see that the search path for .vmoptions file is either:
$HOME/.IntelliJIdea2016.2/idea$BITS.vmoptions
or
$IDE_BIN_HOME/idea$BITS.vmoptions
So, copy file bin/idea64.vmoptions into one of above locations if you have 64 bit JVM installed or file bin/idea.vmoptions else.
The following information is current as of April 23, 2019 for version 2019.1.1 of IntelliJ Ultimate that was installed via JetBrains Toolbox app version 1.14.5179
Locate the start menu item for IntelliJ. For me, it was at:
%APPDATA%\Microsoft\Windows\Start Menu\Programs\JetBrains Toolbox\
with the name:
IntelliJ IDEA Ultimate
right-click on the above item and choose Properties
Change the empty Start In: text box to read:
%LOCALAPPDATA%\JetBrains\Toolbox\apps\IDEA-U\ch-0\191.6707.61\bin\
Once the above work-around has been performed, IntelliJ 2019.1.1 Ultimate will stop emitting the error:
Error launching IDEA cannot find VM options file

Opening IntelliJ's settings dialog freezes the all IDE for few minutes

Every time I open IntelliJ's Settings dialog I need to wait few minutes until I can do anything. also every thing I try to do with-in the setting dialog after it been Released makes it freeze again! for few minutes.
I am using IntelliJ 14.1.4 (64bit) and the vmoptions are:
-server
-Xms2048m
-Xmx4096m
-XX:MaxPermSize=1024M
-XX:ReservedCodeCacheSize=1024M
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops
-XX:+UseConcMarkSweepGC
-XX:+UseParNewGC
-XX:ParallelGCThreads=8
-XX:+AggressiveOpts
-XX:+CMSClassUnloadingEnabled
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing
-XX:CMSIncrementalDutyCycleMin=0
-XX:-TraceClassUnloading
-XX:+TieredCompilation
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djsse.enableSNIExtension=false
couldn't find anything related to this issue on the web.
thanks for the helpers

Intellij Idea 13 ultimate performance slow, lags while typing

I've googled and tried all SO answers, but none seems to be working for me.
The CPU usage remains low when inactive, as soon as I start typing, it jumps and takes a few seconds to see what I'm typing. Should be some kind of inspection/intellisense, but disabling it makes IDE useless (IDE means intellisense to me), although I'm willing to give it a try and have already tried the below things, but nothing seems to be working for me.
I've tried the following things :
1. -Xms512m
-Xmx1024m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=256m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djsse.enableSNIExtension=false
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
2. Disabled Git & Subversion plugin
3. Disabled "Probable Bugs" in settings -> Inspection
4. Made sure that I'm running Idea64.exe and changing idea64.exe.vmoptions
5. Created a system variable IDEA_JDK_64 to point to JDK7Update60
6. Disabled "AutoPopupCodeCompletion" in Editor->CodeCompletion and changed "CaseSensitiveCompletion" to None.
7. Added {userdir}/.intellij and {project}/.idea to Anti-Virus scan exclusion
This is an old question but I just had similar issue and googling pops this page so it might help someone else in the future.
I am running IntelliJ IDEA 16.1 and writing javascipt was unbearably slow. At the end I tried File | Invalidate Caches/Restart which solved the issue.
Had a discussion with Intellij Support Team
The issue was with only large files (8k+ lines of .js code). Probably, because of system hardware limits.
When I worked with files having less lines of code, it behaved fine.