我有一个带有endpoint的小型应用程序,它调用了一些转换器库。我的运行配置
类型为Tomcat
并部署了一个爆炸战争,这是我的应用程序。
在<code>pom中。xml的
当我在
调试
模式下启动 Tomcat 运行配置
时,日志指示代理似乎已正确设置并且工件已成功部署(以下是我认为相关的日志子集):
C:\Apps\apache-tomcat-8.5.56\bin\catalina.bat run
[2021-02-09 01:32:03,448] Artifact crs-classic-conv-endpoint:war exploded: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE: "C:\Users\me\AppData\Local\JetBrains\IntelliJIdea2020.3\tomcat\ac2f062f-8f6d-4769-8de5-120d70232ac9"
Using CATALINA_HOME: "C:\Apps\apache-tomcat-8.5.56"
Using CATALINA_TMPDIR: "C:\Apps\apache-tomcat-8.5.56\temp"
Using JRE_HOME: "C:\Apps\jdk-1.8.0_181_pki18"
Using CLASSPATH: "C:\Apps\apache-tomcat-8.5.56\bin\bootstrap.jar;C:\Apps\apache-tomcat-8.5.56\bin\tomcat-juli.jar"
Connected to the target VM, address: '127.0.0.1:61873', transport: 'socket'
Connected to server
[2021-02-09 01:32:05,611] Artifact crs-classic-conv-endpoint:war exploded: Artifact is being deployed, please wait...
Root WebApplicationContext: initialization started
09-Feb-2021 13:32:30.964 INFOS [RMI TCP Connection(5)-127.0.0.1] com.sun.xml.ws.server.MonitorBase.createRoot Metro monitoring rootname successfully set to: com.sun.metro:pp=/,type=WSEndpoint,name=-RetrieveCRSClassicContractService-RetrieveCRSClassicContractPort
Registering beans for JMX exposure on startup
Bean with name 'loggingConfiguration' has been autodetected for JMX exposure
Bean with name 'mailConfiguration' has been autodetected for JMX exposure
Bean with name 'performanceConfiguration' has been autodetected for JMX exposure
Bean with name 'propertiesConfiguration' has been autodetected for JMX exposure
Located managed bean 'propertiesConfiguration': registering with JMX server as MBean [Foo.${service.name}.Configuration:name=ws-common-utils.PropertiesConfiguration]
Located managed bean 'mailConfiguration': registering with JMX server as MBean [Foo.${service.name}.Configuration:name=ws-common-utils.MailConfiguration]
Located managed bean 'performanceConfiguration': registering with JMX server as MBean [Foo.${service.name}.Configuration:name=ws-common-utils.PerformanceConfiguration]
Located managed bean 'loggingConfiguration': registering with JMX server as MBean [Foo.${service.name}.Configuration:name=ws-common-utils.LoggingConfiguration]
Registering beans for JMX exposure on startup
Bean with name 'loggingConfiguration' has been autodetected for JMX exposure
Bean with name 'mailConfiguration' has been autodetected for JMX exposure
Bean with name 'performanceConfiguration' has been autodetected for JMX exposure
Bean with name 'propertiesConfiguration' has been autodetected for JMX exposure
Located managed bean 'propertiesConfiguration': registering with JMX server as MBean [Foo.${service.name}.Configuration:name=ws-common-utils.PropertiesConfiguration]
Located managed bean 'mailConfiguration': registering with JMX server as MBean [Foo.${service.name}.Configuration:name=ws-common-utils.MailConfiguration]
Located managed bean 'performanceConfiguration': registering with JMX server as MBean [Foo.${service.name}.Configuration:name=ws-common-utils.PerformanceConfiguration]
Located managed bean 'loggingConfiguration': registering with JMX server as MBean [Foo.${service.name}.Configuration:name=ws-common-utils.LoggingConfiguration]
Root WebApplicationContext: initialization completed in 15487 ms
09-Feb-2021 13:32:32.585 INFOS [RMI TCP Connection(5)-127.0.0.1] com.sun.xml.ws.transport.http.servlet.WSServletDelegate.<init> WSSERVLET14 : initialisation du servlet JAX-WS
Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@167fa5b2: startup date [Tue Feb 09 13:32:32 EST 2021]; root of context hierarchy
[2021-02-09 01:32:33,359] Artifact crs-classic-conv-endpoint:war exploded: Artifact is deployed successfully
[2021-02-09 01:32:33,359] Artifact crs-classic-conv-endpoint:war exploded: Deploy took 27,748 milliseconds
然后,我可以看到我的断点由于白色复选标记而被注册:
但是,这仅适用于模块的
src/main/java
目录中的代码。我正在尝试调试的库(在外部库
中找到)不会注册其断点:
我添加了几行日志记录,并修改了该库的
pom.xml
中的版本,并在库和我的应用程序中运行mvn干净安装
,以确保我指向了正确的代码版本。
现在,奇怪的部分来了。当我运行调用应用程序endpoint的测试时,我会看到以下日志:
com.my.app.ExecutionServiceException: java.lang.NullPointerException: TheConverter.java, notWithinYearBoundaries line 1110
at com.my.app.handleTransaction(MyAppEndpointHandler.java:143)
这向我证明了我在日志记录(
L1109
)上有断点的库代码确实正在运行(并且我在Tomcat日志中看到了实际日志)。
此外,当我单击< code > myappendpointhandler . Java:143
时,IntelliJ确实打开了我在其中设置了标记为已注册的断点的类(是的,< code>L61与< code>L143在同一个函数内)。
L61
上的注册断点时,IntelliJ甚至不会中断正在运行的应用程序向我显示调试窗口
这很令人不安,我尝试了很多不同的事情(我在另一个SO问题中看到的一堆东西,除其他外):
干净
值得一提的是,我团队中的另外两名开发人员报告说,在他们的机器上,他们没有遇到我的问题。我们似乎必须使用相同的IntelliJ配置和设置。
以下是
Tomcat 运行配置
:
以下是我的< code >调试器
设置:
以下是控制台日志的部分版本:
...
[JDI: Sending Command(id=16) JDWP.VirtualMachine.TopLevelThreadGroups]
[JDI: Receiving Command(id=16) JDWP.VirtualMachine.TopLevelThreadGroups]
[JDI: Receiving: groups(ThreadGroupReferenceImpl[]): ]
[JDI: Creating new com.jetbrains.jdi.ThreadGroupReferenceImpl (id = 336)]
[JDI: Receiving: groups[i](ThreadGroupReferenceImpl): ref=336]
[JDI: Sending Command(id=18) JDWP.EventRequest.Set]
[JDI: Sending: eventKind(byte): 6]
[JDI: Sending: suspendPolicy(byte): 0]
[JDI: Sending: modifiers(Modifier[]): ]
[JDI: Receiving Command(id=18) JDWP.EventRequest.Set]
[JDI: Receiving: requestID(int): 4]
[JDI: Sending Command(id=20) JDWP.EventRequest.Set]
[JDI: Sending: eventKind(byte): 7]
[JDI: Sending: suspendPolicy(byte): 0]
[JDI: Sending: modifiers(Modifier[]): ]
[JDI: Receiving Command(id=20) JDWP.EventRequest.Set]
[JDI: Receiving: requestID(int): 5]
[JDI: Sending Command(id=22) JDWP.EventRequest.Set]
[JDI: Sending: eventKind(byte): 8]
[JDI: Sending: suspendPolicy(byte): 1]
[JDI: Sending: modifiers(Modifier[]): ]
[JDI: Sending: modifiers[i](Modifier): ]
[JDI: Sending: modKind(byte): 5]
[JDI: Sending: classPattern(String): sun.instrument.InstrumentationImpl]
[JDI: Receiving Command(id=22) JDWP.EventRequest.Set]
[JDI: Receiving: requestID(int): 6]
[JDI: Sending Command(id=24) JDWP.EventRequest.Set]
[JDI: Sending: eventKind(byte): 8]
[JDI: Sending: suspendPolicy(byte): 1]
[JDI: Sending: modifiers(Modifier[]): ]
[JDI: Sending: modifiers[i](Modifier): ]
[JDI: Sending: modKind(byte): 5]
[JDI: Sending: classPattern(String): sun.instrument.InstrumentationImpl]
[JDI: Receiving Command(id=24) JDWP.EventRequest.Set]
[JDI: Receiving: requestID(int): 7]
[JDI: Sending Command(id=26) JDWP.EventRequest.Set]
[JDI: Sending: eventKind(byte): 8]
[JDI: Sending: suspendPolicy(byte): 1]
[JDI: Sending: modifiers(Modifier[]): ]
[JDI: Sending: modifiers[i](Modifier): ]
[JDI: Sending: modKind(byte): 5]
[JDI: Sending: classPattern(String): com.my.app.RetrieveCRSClassicContractEndpointHandler]
[JDI: Receiving Command(id=26) JDWP.EventRequest.Set]
[JDI: Receiving: requestID(int): 8]
[JDI: Sending Command(id=28) JDWP.EventRequest.Set]
[JDI: Sending: eventKind(byte): 8]
[JDI: Sending: suspendPolicy(byte): 1]
[JDI: Sending: modifiers(Modifier[]): ]
[JDI: Sending: modifiers[i](Modifier): ]
[JDI: Sending: modKind(byte): 5]
[JDI: Sending: classPattern(String): com.my.app.RetrieveCRSClassicContractEndpointHandler]
[JDI: Receiving Command(id=28) JDWP.EventRequest.Set]
[JDI: Receiving: requestID(int): 9]
[JDI: Sending Command(id=30) JDWP.EventRequest.Set]
[JDI: Sending: eventKind(byte): 8]
[JDI: Sending: suspendPolicy(byte): 1]
[JDI: Sending: modifiers(Modifier[]): ]
[JDI: Sending: modifiers[i](Modifier): ]
[JDI: Sending: modKind(byte): 5]
[JDI: Sending: classPattern(String): com.the.library.TheConverter]
[JDI: Receiving Command(id=30) JDWP.EventRequest.Set]
[JDI: Receiving: requestID(int): 10]
[JDI: Sending Command(id=32) JDWP.EventRequest.Set]
[JDI: Sending: eventKind(byte): 8]
[JDI: Sending: suspendPolicy(byte): 1]
[JDI: Sending: modifiers(Modifier[]): ]
[JDI: Sending: modifiers[i](Modifier): ]
[JDI: Sending: modKind(byte): 5]
[JDI: Sending: classPattern(String): com.my.app.SomeException]
[JDI: Receiving Command(id=32) JDWP.EventRequest.Set]
[JDI: Receiving: requestID(int): 11]
[JDI: Sending Command(id=34) JDWP.VirtualMachine.Resume]
[JDI: Clearing VM suspended cache]
[JDI: Clearing temporary cache for ThreadReference 1]
[JDI: Receiving Command(id=1) JDWP.Event.Composite]
[JDI: Clearing temporary cache for ThreadGroupReference 336]
[JDI: Receiving: suspendPolicy(byte): 0]
[JDI: Receiving Command(id=34) JDWP.VirtualMachine.Resume]
[JDI: Receiving: events(Events[]): ]
[JDI: Receiving: events[i](Events): ]
[JDI: Receiving: eventKind(byte): 8]
[JDI: Receiving: requestID(int): 2]
[JDI: Receiving: thread(ThreadReferenceImpl): ref=1]
[JDI: Receiving: refTypeTag(byte): 1]
[JDI: Receiving: typeID(long): ref=337]
[JDI: Receiving: signature(String): Ljava/lang/InternalError;]
[JDI: Receiving: status(int): 7]
[JDI: EventSet: SUSPEND_NONE]
[JDI: Looking up Class, signature='Ljava/lang/InternalError;', id=337]
[JDI: Caching new ReferenceType, sig=Ljava/lang/InternalError;, id=337]
[JDI: Sending Command(id=39) JDWP.ThreadReference.Name]
[JDI: Sending: thread(ThreadReferenceImpl): ref=1]
[JDI: Receiving Command(id=39) JDWP.ThreadReference.Name]
[JDI: Receiving: threadName(String): main]
[JDI: Event: ClassPrepareEvent in thread main]
[JDI: Receiving Command(id=2) JDWP.Event.Composite]
[JDI: Receiving: suspendPolicy(byte): 0]
[JDI: Receiving: events(Events[]): ]
[JDI: Handled Prepare Event for java.lang.InternalError]
[JDI: Receiving: events[i](Events): ]
[JDI: Receiving: eventKind(byte): 8]
[JDI: Receiving: requestID(int): 2]
[JDI: Receiving: thread(ThreadReferenceImpl): ref=1]
[JDI: Receiving: refTypeTag(byte): 2]
[JDI: Receiving: typeID(long): ref=338]
[JDI: Receiving: signature(String): Ljava/lang/instrument/Instrumentation;]
[JDI: Receiving: status(int): 3]
[JDI: EventSet: SUSPEND_NONE]
[JDI: Looking up Interface, signature='Ljava/lang/instrument/Instrumentation;', id=338]
[JDI: Caching new ReferenceType, sig=Ljava/lang/instrument/Instrumentation;, id=338]
[JDI: Sending Command(id=41) JDWP.ThreadReference.Name]
[JDI: Sending: thread(ThreadReferenceImpl): ref=1]
[JDI: Receiving Command(id=41) JDWP.ThreadReference.Name]
[JDI: Receiving: threadName(String): main]
[JDI: Event: ClassPrepareEvent in thread main]
[JDI: Receiving Command(id=3) JDWP.Event.Composite]
[JDI: Receiving: suspendPolicy(byte): 1]
[JDI: Handled Prepare Event for java.lang.instrument.Instrumentation]
[JDI: Receiving: events(Events[]): ]
[JDI: Receiving: events[i](Events): ]
[JDI: Receiving: eventKind(byte): 8]
[JDI: Receiving: requestID(int): 7]
[JDI: Receiving: thread(ThreadReferenceImpl): ref=1]
[JDI: Receiving: refTypeTag(byte): 1]
[JDI: Receiving: typeID(long): ref=339]
[JDI: Receiving: signature(String): Lsun/instrument/InstrumentationImpl;]
[JDI: Receiving: status(int): 3]
[JDI: Receiving: events[i](Events): ]
[JDI: Receiving: eventKind(byte): 8]
[JDI: Receiving: requestID(int): 6]
[JDI: Receiving: thread(ThreadReferenceImpl): ref=1]
[JDI: Receiving: refTypeTag(byte): 1]
[JDI: Receiving: typeID(long): ref=339]
[JDI: Receiving: signature(String): Lsun/instrument/InstrumentationImpl;]
[JDI: Receiving: status(int): 3]
[JDI: Receiving: events[i](Events): ]
[JDI: Receiving: eventKind(byte): 8]
[JDI: Receiving: requestID(int): 2]
[JDI: Receiving: thread(ThreadReferenceImpl): ref=1]
[JDI: Receiving: refTypeTag(byte): 1]
[JDI: Receiving: typeID(long): ref=339]
[JDI: Receiving: signature(String): Lsun/instrument/InstrumentationImpl;]
[JDI: Receiving: status(int): 3]
[JDI: EventSet: SUSPEND_EVENT_THREAD]
...
[JDI: EventSet: SUSPEND_NONE]
[JDI: Looking up Class, signature='Lcom/another/library/AbstractServiceRequestHandler;', id=7241]
[JDI: Caching new ReferenceType, sig=Lcom/another/library/AbstractServiceRequestHandler;, id=7241]
[JDI: Sending Command(id=20792) JDWP.ThreadReference.Name]
[JDI: Sending: thread(ThreadReferenceImpl): ref=2559]
[JDI: Receiving Command(id=20792) JDWP.ThreadReference.Name]
[JDI: Receiving: threadName(String): RMI TCP Connection(4)-127.0.0.1]
[JDI: Event: ClassPrepareEvent in thread RMI TCP Connection(4)-127.0.0.1]
[JDI: Receiving Command(id=6914) JDWP.Event.Composite]
[JDI: Receiving: suspendPolicy(byte): 1]
[JDI: Receiving: events(Events[]): ]
[JDI: Receiving: events[i](Events): ]
[JDI: Receiving: eventKind(byte): 8]
[JDI: Receiving: requestID(int): 9]
[JDI: Receiving: thread(ThreadReferenceImpl): ref=2559]
[JDI: Receiving: refTypeTag(byte): 1]
[JDI: Receiving: typeID(long): ref=7242]
[JDI: Receiving: signature(String): Lcom/my/app/RetrieveCRSClassicContractEndpointHandler;]
[JDI: Receiving: status(int): 3]
[JDI: Receiving: events[i](Events): ]
[JDI: Receiving: eventKind(byte): 8]
[JDI: Receiving: requestID(int): 8]
[JDI: Receiving: thread(ThreadReferenceImpl): ref=2559]
[JDI: Receiving: refTypeTag(byte): 1]
[JDI: Receiving: typeID(long): ref=7242]
[JDI: Receiving: signature(String): Lcom/my/app/RetrieveCRSClassicContractEndpointHandler;]
[JDI: Receiving: status(int): 3]
[JDI: Receiving: events[i](Events): ]
[JDI: Receiving: eventKind(byte): 8]
[JDI: Receiving: requestID(int): 2]
[JDI: Receiving: thread(ThreadReferenceImpl): ref=2559]
[JDI: Receiving: refTypeTag(byte): 1]
[JDI: Receiving: typeID(long): ref=7242]
[JDI: Receiving: signature(String): Lcom/my/app/RetrieveCRSClassicContractEndpointHandler;]
[JDI: Receiving: status(int): 3]
[JDI: Handled Prepare Event for com.another.library.AbstractServiceRequestHandler]
[JDI: EventSet: SUSPEND_EVENT_THREAD]
[JDI: Looking up Class, signature='Lcom/my/app/RetrieveCRSClassicContractEndpointHandler;', id=7242]
[JDI: Caching new ReferenceType, sig=Lcom/my/app/RetrieveCRSClassicContractEndpointHandler;, id=7242]
[JDI: Sending Command(id=20794) JDWP.ThreadReference.Name]
[JDI: Sending: thread(ThreadReferenceImpl): ref=2559]
[JDI: Receiving Command(id=20794) JDWP.ThreadReference.Name]
[JDI: Receiving: threadName(String): RMI TCP Connection(4)-127.0.0.1]
[JDI: Event: ClassPrepareEvent in thread RMI TCP Connection(4)-127.0.0.1]
[JDI: Looking up Class, signature='Lcom/my/app/RetrieveCRSClassicContractEndpointHandler;', id=7242]
[JDI: Sending Command(id=20796) JDWP.ThreadReference.Name]
[JDI: Sending: thread(ThreadReferenceImpl): ref=2559]
[JDI: Receiving Command(id=20796) JDWP.ThreadReference.Name]
[JDI: Receiving: threadName(String): RMI TCP Connection(4)-127.0.0.1]
[JDI: Event: ClassPrepareEvent in thread RMI TCP Connection(4)-127.0.0.1]
[JDI: Looking up Class, signature='Lcom/my/app/RetrieveCRSClassicContractEndpointHandler;', id=7242]
[JDI: Sending Command(id=20798) JDWP.ThreadReference.Name]
[JDI: Sending: thread(ThreadReferenceImpl): ref=2559]
[JDI: Receiving Command(id=20798) JDWP.ThreadReference.Name]
[JDI: Receiving: threadName(String): RMI TCP Connection(4)-127.0.0.1]
[JDI: Event: ClassPrepareEvent in thread RMI TCP Connection(4)-127.0.0.1]
[JDI: Handled Prepare Event for com.my.app.RetrieveCRSClassicContractEndpointHandler]
[JDI: Sending Command(id=20800) JDWP.ReferenceType.MethodsWithGeneric]
[JDI: Sending: refType(ReferenceTypeImpl): ref=7242]
[JDI: Receiving Command(id=20800) JDWP.ReferenceType.MethodsWithGeneric]
[JDI: Receiving: declared(MethodInfo[]): ]
[JDI: Receiving: declared[i](MethodInfo): ]
[JDI: Receiving: methodID(long): 748485344]
[JDI: Receiving: name(String): <init>]
[JDI: Receiving: signature(String): ()V]
[JDI: Receiving: genericSignature(String): ]
[JDI: Receiving: modBits(int): 1]
[JDI: Receiving: declared[i](MethodInfo): ]
[JDI: Receiving: methodID(long): 748485368]
[JDI: Receiving: name(String): validateRequest]
[JDI: Receiving: signature(String): (Lcom/my/app/IRetrieveCRSClassicContractRequest;Lcom/my/app/IRetrieveCRSClassicContractResponse;)Z]
[JDI: Receiving: genericSignature(String): ]
[JDI: Receiving: modBits(int): 1]
[JDI: Receiving: declared[i](MethodInfo): ]
[JDI: Receiving: methodID(long): 748485384]
[JDI: Receiving: name(String): handleTransaction]
[JDI: Receiving: signature(String): (Lcom/my/app/IRetrieveCRSClassicContractRequest;Lcom/my/app/IRetrieveCRSClassicContractResponse;)V]
...
[JDI: Sending Command(id=20820) JDWP.ReferenceType.SourceFile]
[JDI: Sending: refType(ReferenceTypeImpl): ref=7242]
[JDI: Receiving Command(id=20820) JDWP.ReferenceType.SourceFile]
[JDI: Receiving: sourceFile(String): RetrieveCRSClassicContractEndpointHandler.java]
[JDI: Sending Command(id=20822) JDWP.EventRequest.Set]
[JDI: Sending: eventKind(byte): 2]
[JDI: Sending: suspendPolicy(byte): 2]
[JDI: Sending: modifiers(Modifier[]): ]
[JDI: Sending: modifiers[i](Modifier): ]
[JDI: Sending: modKind(byte): 7]
[JDI: Sending: loc(Location): com.my.app.RetrieveCRSClassicContractEndpointHandler:35]
[JDI: Receiving Command(id=20822) JDWP.EventRequest.Set]
[JDI: Receiving: requestID(int): 14]
[JDI: Sending Command(id=20824) JDWP.EventRequest.Set]
[JDI: Sending: eventKind(byte): 2]
[JDI: Sending: suspendPolicy(byte): 2]
[JDI: Sending: modifiers(Modifier[]): ]
[JDI: Sending: modifiers[i](Modifier): ]
[JDI: Sending: modKind(byte): 7]
[JDI: Sending: loc(Location): com.my.app.RetrieveCRSClassicContractEndpointHandler:61]
[JDI: Receiving Command(id=20824) JDWP.EventRequest.Set]
[JDI: Receiving: requestID(int): 15]
[JDI: Sending Command(id=20826) JDWP.ThreadReference.Resume]
[JDI: Sending: thread(ThreadReferenceImpl): ref=2559]
[JDI: Receiving Command(id=20826) JDWP.ThreadReference.Resume]
[JDI: Receiving Command(id=6915) JDWP.Event.Composite]
[JDI: Receiving: suspendPolicy(byte): 0]
[JDI: Receiving: events(Events[]): ]
[JDI: Receiving: events[i](Events): ]
[JDI: Receiving: eventKind(byte): 8]
[JDI: Receiving: requestID(int): 2]
[JDI: Receiving: thread(ThreadReferenceImpl): ref=2559]
[JDI: Receiving: refTypeTag(byte): 2]
[JDI: Receiving: typeID(long): ref=7243]
[JDI: Receiving: signature(String): Lcom/my/app/core/repository/IRepository;]
[JDI: Receiving: status(int): 3]
[JDI: EventSet: SUSPEND_NONE]
...
[JDI: Sending Command(id=24396) JDWP.ThreadReference.Name]
[JDI: Sending: thread(ThreadReferenceImpl): ref=3191]
[JDI: Receiving Command(id=24396) JDWP.ThreadReference.Name]
[JDI: Receiving: threadName(String): RMI TCP Connection(idle)]
[JDI: Event: ThreadDeathEvent in thread RMI TCP Connection(idle)]
[JDI: Receiving Command(id=8105) JDWP.Event.Composite]
[JDI: Receiving: suspendPolicy(byte): 0]
[JDI: Receiving: events(Events[]): ]
[JDI: Receiving: events[i](Events): ]
[JDI: Receiving: eventKind(byte): 7]
[JDI: Receiving: requestID(int): 5]
[JDI: Receiving: thread(ThreadReferenceImpl): ref=1805]
[JDI: EventSet: SUSPEND_NONE]
[JDI: Sending Command(id=24399) JDWP.ThreadReference.Name]
[JDI: Sending: thread(ThreadReferenceImpl): ref=1805]
[JDI: Receiving Command(id=24399) JDWP.ThreadReference.Name]
[JDI: Receiving: threadName(String): RMI TCP Connection(idle)]
[JDI: Event: ThreadDeathEvent in thread RMI TCP Connection(idle)]
2021-02-10 11:08:47,714 [ 204386] WARN - n.process.BaseOSProcessHandler - Process hasn't generated any output for a long time.
If it's a long-running mostly idle daemon process, consider overriding OSProcessHandler#readerOptions with 'BaseOutputReader.Options.forMostlySilentProcess()' to reduce CPU usage.
Command line: C:\Apps\apache-tomcat-8.5.56\bin\catalina.bat run
java.lang.Throwable: Process creation:
at com.intellij.execution.process.BaseOSProcessHandler.<init>(BaseOSProcessHandler.java:32)
at com.intellij.execution.process.OSProcessHandler.<init>(OSProcessHandler.java:91)
at com.intellij.execution.process.OSProcessHandler.<init>(OSProcessHandler.java:84)
at com.intellij.javaee.appServers.run.execution.LocalJavaeeServerProcessHandler.<init>(LocalJavaeeServerProcessHandler.java:40)
at com.intellij.javaee.appServers.run.execution.PatchedLocalState$ScriptBasedLocalJavaeeServerProcessHandler.<init>(PatchedLocalState.java:190)
at com.intellij.javaee.appServers.run.execution.PatchedLocalState.startJ2EEProcess(PatchedLocalState.java:98)
at com.intellij.javaee.appServers.run.execution.J2EEProcessHandlerWrapper.lambda$new$0(J2EEProcessHandlerWrapper.java:97)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
[JDI: Receiving Command(id=8106) JDWP.Event.Composite]
[JDI: Receiving: suspendPolicy(byte): 0]
[JDI: Receiving: events(Events[]): ]
[JDI: Receiving: events[i](Events): ]
[JDI: Receiving: eventKind(byte): 7]
[JDI: Receiving: requestID(int): 5]
[JDI: Receiving: thread(ThreadReferenceImpl): ref=2559]
[JDI: EventSet: SUSPEND_NONE]
[JDI: Sending Command(id=24402) JDWP.ThreadReference.Name]
[JDI: Sending: thread(ThreadReferenceImpl): ref=2559]
[JDI: Receiving Command(id=24402) JDWP.ThreadReference.Name]
[JDI: Receiving: threadName(String): RMI TCP Connection(idle)]
[JDI: Event: ThreadDeathEvent in thread RMI TCP Connection(idle)]
[JDI: Sending Command(id=24404) JDWP.VirtualMachine.Resume]
[JDI: Receiving Command(id=24404) JDWP.VirtualMachine.Resume]
[JDI: Sending Command(id=24406) JDWP.VirtualMachine.Dispose]
[JDI: Receiving Command(id=24406) JDWP.VirtualMachine.Dispose]
[JDI: Target VM i/f closing event queues]
[JDI: Internal event handler exiting]
[JDI: Target VM interface thread exiting]
[JDI: Sending Command(id=24408) JDWP.VirtualMachine.Dispose]
shutdown on Thread[AWT-EventQueue-0,6,Idea Thread Group]
原来是误会。我以为 Test 类正在对本地主机
Tomcat 实例进行网络调用,而实际上它直接调用了源代码。
这就是为什么当我在调试模式下启动 Tomcat 运行配置时,我会在我的源代码中获得一个注册的断点,但它永远不会挂起应用程序,尽管我看到了日志。
由于应用程序被配置为在target
中的文件中输出日志,所以我认为日志来自Tomcat。
从Debug模式下启动的Test类开始,我进入了应用程序代码,最终也进入了库代码。这也是为什么我在调试模式下启动Tomcat运行配置后,在正常运行测试类时,看到了来自库的日志,但没有看到注册的断点。
啊。那是一次尴尬而耗时的旅程。
我试图运行一个基本的Kotlin主文件,但问题是我没有任何可用的运行/调试配置。 我的main.kt文件位于src>main下,是一个非常简单的Helloworld程序。见下图。当我输入Add configuration>kotlin并在Main Class中键入MainKt时,我得到警告:Class MainKt not found。在以前的项目中,MainKt是默认的,我不必手动添加配置。还有
问题内容: 我正在使用使用构建工具的框架来开发项目。 我的问题是,断点根本无法 以我尝试的任何方式工作。 这是我在中使用的运行配置: 因此,部署是使用来完成的Gradle,运行没有任何问题,IntelliJ 调试器已连接,但是断点不起作用。 我尝试使其工作的方法: 1)Gradle运行配置。这是运行配置Intellij IDEA: 使用Gradle的Intellij运行配置 尝试使用远程调试工具启
我在WebStorm中有以下配置设置: 当我单击debug时,它会启动Chrome fine并导航到页面,但我的断点从未被击中。但是,它是以某种方式连接的,因为我在WebStorm中看到了的所有输出。 我试图导航到屏幕截图中指定的URL,并在中找到断点,但它没有像预期的那样工作(请参见:根本没有)。我不确定我错过了什么。我尝试在远程URL部分中为特定的文件设置远程URL,但这也没有帮助。 允许在断
我必须在Tomcat(操作系统: MS Windows)上调试SSL握手,所以我按照在Web中找到的说明启用了以下行setenv.bat: 设置"JAVA_OPTS=%JAVA_OPTS%-Djavax.net.debug=ssl" 使用Apache Tomcat/9.0.0。M21一切正常,当我用浏览器打开页面时,我可以看到命令行上的握手。 使用Apache Tomcat/9.0.0。M22我只
由于某些原因,Intellij IDEA在运行/调试配置中的“将控制台输出保存到文件”选项在我的TestNG测试运行中被截断。其他海报指出,要真正看到所有测试的控制台输出,您必须在IDEA Run窗口中的树下钻取,单击+on package,单击+on test class等,然后单击每个测试方法以看到它的控制台输出。 例如:IntelliJ IDEA TestNG输出控制台清除 无论如何,我在日
我已经用spring Security保护了我的spring boot应用程序(基本身份验证)。我为可以使用监视和管理的用户添加了角色管理。我设置management.security.roles=management。具有此角色的用户只能看到状态(使用运行状况终结点)。如果我设置management.security.role=management,则一切正常(具有此角色的用户可查看所有健康参数