java 在行中找不到可执行代码

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16466262/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 23:02:56  来源:igfitidea点击:

No executable code found at line

javamavenbuildintellij-ideamaven-assembly-plugin

提问by user215005

I am getting this message "No executable code found at line" when doing a remote debug from IntelliJ ver 12. This is a Java application. It is using maven for building the war. Not sure where to make the change in order to do the debugging properly.

从 IntelliJ 版本 12 进行远程调试时,我收到此消息“在线找不到可执行代码”。这是一个 Java 应用程序。它正在使用 maven 来构建War。不确定在哪里进行更改才能正确进行调试。

回答by CrazyCoder

You need to ensure that sources in editor are in sync with the classes on the server. Classes must be compiled from exactly the same sources with the debug option enabled for the compiler.

您需要确保编辑器中的源与服务器上的类同步。类必须从完全相同的源编译,并为编译器启用调试选项。

Note that your classpath may be configured incorrectly and include some old version of the classes that you are trying to debug. It may also include different versions of the same class (like one from the .jar, another from classes) and JVM will load not the one you need.

请注意,您的类路径可能配置不正确,并且包含您尝试调试的某些旧版本的类。它还可能包含同一类的不同版本(例如一个来自.jar,另一个来自classes)并且 JVM 将加载不是您需要的那个。