> For the complete documentation index, see [llms.txt](https://jairanjankumar.gitbook.io/cheatsheet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jairanjankumar.gitbook.io/cheatsheet/intellij-idea.md).

# IntelliJ Idea

Useful commands

```
cmd+shift+a
# search the action to perform
```

Open Breakpoints dialog

```
Ctrl + Shift + F8
```

To show the heap memory indicator at bottom right corner.

```
Go to IntelliJ IDEA -> Preferences -> Appearance & Behavior-> Appearance
Check the option 'Show memory indicator'
```

To increase the heap size memory for IntelliJ IDEA

```
Go to Help -> Edit Custom VM Options...

First time, this will ask to create Custom VM Options file (idea.vmoptions).

Physical location of idea.vmoptions file is '~/Library/Preferences/IdeaIC2017.2/idea.vmoptions' 

$ cat ~/Library/Preferences/IdeaIC2017.2/idea.vmoptions 
# custom IntelliJ IDEA VM options

-Xms1024m
-Xmx2048m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-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
-Xbootclasspath/a:../lib/boot.jar
```

Intellij how to zoom in /out

```
Intellij Idea > Preferences > Editor > General -> Change font size (Zoom) with Ctrl+Mouse Wheel
```

Not able to navigate code (when press cmd+b, it says 'cannot find declaration to go to')

```
1) # mark the src folder to Sources Root 
right click in src -> Mark Directory as > Sources Root

2) go to Gradle tab, and click 'Refresh all Gradle projects'
```

IntelliJ doesn't show any folders in my project view on the left

```
File > Project Structure > Modules, 
there's supposed to be project file present. 
If it's empty, do the following:
In File > Project Structure > Modules, click the "+" button, and add the project.
```

Maven package works but Intellij's build fails and does't create compiled files target folder

```
mvn idea:idea
```

Scala Worksheet - When executed, nothing comes up or throws Internal Error: null

```
In worksheet -> go to setting -> change 'Run type' from REPL to Plain
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://jairanjankumar.gitbook.io/cheatsheet/intellij-idea.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
