Normally, in IntelliJ, you just setup two modules with a dependency to solve things like this. In this case make the Console module depend on the Spring module (in Project Structure).
If you want them more loosely coupled you could make two IntelliJ project and create a jar with the Spring classes then use that jar in the Console project.
The second question (about debug mode): yes you can set debug mode see javac -help
C:\jdk>javac -help
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
...
If you ask this question you should probably have debugging info on, which I think is default in IntelliJ, check in Java complier settings Generate debugging info
. For more info on what it means see Is there a performance difference between Javac debug on and off?