When I run and stop the application, IntelliJ deletes my lines of code.

Answered

Hello, I'm a student and I recently started using IntelliJ. I'm having problems with a project made in Spring Boot and Maven.

Im using:
IntelliJ IDEA 2024.2.0.1 (Ultimate Edition)
Build #IU-242.20224.387, built on August 13, 2024
Runtime version: 21.0.3+13-b509.4 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.15.0-117-generic.

When I start and stop the application in IntelliJ, it deletes the lines of code that aren't committed to GitHub.

I think the problem might be related to auto-save.

I've tried:

  • Doing a clean install
  • Disabling the 3 plugins I've installed
  • Deleting the configurations in the .idea folder
  • Disabling everything related to auto-save in File > Appearance & Behavior > System Settings.

I hope you can help me. Thank you very much.

 

 

 

 

 

 

0
2 comments
Hi Jai, after running the application, some printing sentences are removed, right?
May I know are you using remote development, or pull the project into your local disk then edit?

If it's pulled from VCS, I think it may be related to the version of the file, please go to the project folder in your local disk, and find the java file, open it with NotePad before and after running the application, then check if there are any difference between them.
1

Thank you Jerome, i did what you said and it was the VCS.

I fixed it making another folder and pulling the repo from github and its works well now.

Sorry for my bad english.

0

Please sign in to leave a comment.