A pit about IDEA's debug blocking mode

-----------------------20180504 update------------------------- ------------

When using idea's maven compile today, I found that although idea's settings have set Java compile to 1.8 (my local jdk version), and the project settings of the maven project are also 1.8, the following situation has always occurred:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project xxx: Fatal error compiling: Invalid target distribution:

The solution is to first confirm that the settings->Java compile and project structure->module->language level of the idea are both 8, and then ensure that the pom.xml of the parent project has the following code:

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <encoding>UTF-8</encoding>
          <verbose>true</verbose>
          <compilerArguments>
            <sourcepath>${project.basedir}/src/main/java</sourcepath>
          </compilerArguments>
        </configuration>
      </plugin>

 Note that ${ java.version} here must be defined (or hard-coded) in properties, otherwise it will never find the default 1.5 to compile.

---------------------------------------------------------------------------------------------------------------------------

 

Today, it has been pitted for a long time because of a blocking problem in the debug mode under the idea tool.

During local debug debugging, when making a remote call, debug on the server side, a probing thread is also dead due to the global blocking (All) of the debug, and the probing mechanism will be identified as dead, causing the client and the server to create a new thread. A socket goes to the request again (the probing mechanism of the project I do is like this), resulting in repeated calls and thus repeated data. (The online environment does not have this problem because there is no debug). Note that this situation is different from a situation where a service takes a long time and cannot get a response within a specified time (in this case, the probing mechanism is not considered dead)~

 

Later, it was found that it was the pot of idea. In debug mode, its default suspend is All, which needs to be changed to Thread:



 



 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325339926&siteId=291194637