[英]Debugging in IntelliJ (Reloading changed classes)
I recently switched from eclipse to IntelliJ.我最近从 eclipse 切换到 IntelliJ。 Eclipse's debug launcher used to reload the application instantly, whenever a class was saved. Eclipse 的调试启动器用于在保存类时立即重新加载应用程序。 IntelliJ takes more than 10 secs to reload changed classes, which might not be a lot, but it is annoying because I use it so frequently. IntelliJ 需要超过 10 秒来重新加载更改的类,这可能不是很多,但很烦人,因为我经常使用它。
How to make IntelliJ reload changed classes faster?如何让 IntelliJ 更快地重新加载已更改的类?
To reload changed classes重新加载更改的类
InteliJ is not recompiling the code after change in java files and rebuilding InteliJ 在更改 java 文件并重建后不会重新编译代码
Project > Setting>Build,Execution,Deployment>Compiler>check "build project automatically"项目>设置>构建、执行、部署>编译器>勾选“自动构建项目”
Ctrl + Shift + A find "registry", according to your requirements check the following: Ctrl + Shift + A找到“注册表”,根据你的要求勾选以下内容:
compiler.automake.allow.when.app.running compiler.automake.trigger.delay=500
Add devtool in pom.xml
:在pom.xml
添加 devtool :
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
Build, If found any probelm while building, saying some jar in not in class path.构建,如果在构建时发现任何问题,则说一些 jar 不在类路径中。 Just delete the corrupted jar and re-build the project angain after sync with maven libb只需删除损坏的 jar 并在与 maven libb 同步后重新构建项目
rcc
(or "recompile changed classes")键入rcc
(或“重新编译更改的类”)next time you dont need to type, it will give the last run action下次你不需要输入时,它会给出最后一次运行的动作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.