When starting the debugger it builds just fine, but when it after building opens the debugger console it exits immediately:
C:\Program Files\Java\jdk-18.0.1\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:50124,suspend=y,server=n -javaagent:C:\Users\ksneh\AppData\Local\JetBrains\IdeaIC2021.3\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\Users\ksneh\OneDrive\Desktop\Data Structure\out\production\Data Structure;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.3.3\lib\idea_rt.jar" richestWealth
Connected to the target VM, address: '127.0.0.1:50124', transport: 'socket'
8
Disconnected from the target VM, address: '127.0.0.1:50124', transport: 'socket'
Process finished with exit code 0