Run/Debug does not work and gets greyed out
Answered
Run/Debug does not work
IntelliJ IDEA 2022.1 (Community Edition)
Build #IC-221.5080.210, built on April 11, 2022
Runtime version: 11.0.14.1+1-b2043.25 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Kotlin: 212-1.5.10-release-IJ5457.46
Please sign in to leave a comment.
Don't you have indexsing process runnning in the background? Please share the screenshot of the whole window.
No, indexing process already completed. Please find below the full screenshot.
There is "Analyzing" task (see the top right).
Try to re-import the project after removing .idea directory in project's root.
Could be caused by custom plugins as well.
The Analyzing task looks completed, but still that is showing. Not sure why. See below screenshot.
Anyway re-imported the project after removing .idea directory in project's root. Still facing same issue.
I don't have any custom plugins (no Downloaded plugins).

There are 2 possible causes from my point of view:
1. Try enabling all bundled plugins back
2. Try moving the class file to a package.
Does anything help?
Tried both options and issue remains.
OK, try to reset settings to default via File | Manage IDE Settings | Restore Default Settings Is "Analyzing" still shown after that?
Yes, restored to default settings and still it shows "Analyzing".
.
With default settings, I don't get Run/Debug option on right clicking on the editor. Once Kotlin plugin is disabled Run/Debug option is available, but when triggered nothing happens and option shows disabled
Attaching the thread dump using jstack
2022-05-10 09:23:30
Full thread dump OpenJDK 64-Bit Server VM (11.0.14.1+1-b2043.25 mixed mode):
May you quit IntelliJ IDEA, clean logs folder, reproduce the issue and share the newly generated logs (Help | Collect Logs And Diagnostic Data) after that? You can use https://uploads.jetbrains.com/ for sharing
This is the log file after doing above steps.
Upload id: 2022_05_10_Nj1nNjGnNUMSZXTi (file: idea.log)
Then disabled Kotlin plugin and did Run after right-click on java file.
Upload id: 2022_05_10_8fxykrJy76AuUBQL (file: Run_idea.log)
Do you have android studio running or android plugin enabled? Try to quit/disable them.
Seems this exception is related:
Android studio is not running. Android plugin was enabled when I reset to default settings and above error is observed. But when I disabled Kotlin plugin, Android plugin got disabled and above error is not coming (Please see second attachment).