Problems debugging wildfly deployed JSF app

已回答

IntelliJ IDEA 2020.3.1 (Ultimate Edition)
Build #IU-203.6682.168, built on December 29, 2020
Runtime version: 11.0.9.1+11-b1145.63 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12

Hello,

I have a JEE app project setup in intellij. I have a run configuration setup using wildfly and it starts and runs fine on local.

Now I'm trying to set breakpoints and start this same configuration in debug mode, but when it starts no breakpoints are hit, and if I attempt to "attach to process", and select what would seem the most obvious choice, it then breaks somewhere in the server code and won't proceed until I detach from the process, again not respecting my breakpoints.

Any assistance on proper setup for this?

 

0

Please contact support at https://intellij-support.jetbrains.com/hc/requests/new with the sample project and the steps to reproduce.

Specify your WildFly version and the places where the breakpoints are set.

0

I'm not sure if it's a bug necessarily, though it could be. Really need to know if it's configured as it should. If found that it is and still not working I could go about the tasks as you request above. This project that I'm working from is pretty large and would be a pretty big undertaking to chop it down to something demonstrable. 

0

Do all the breakpoints fail, in both JSP and Java code? Do the breakpoints have the checkmarks in the code when you connect to the server?

The common issue is if the code running on the server is different than the one you have it the editor. It can happen if some jar deployed on the server comes first on the classpath and overrides the code compiled by the IDE.

Double check the artifact you are deploying is in sync with the source code in the editor and no jar in the libraries contains the same code.

0

Process when running...

1) I start the run configuration in debug...

2) I'm assuming I need to then run->attach to process->c:\wildfly-20.0.1.Final\jboss-modules.jar (?)
as this is the only "process" in the list that would seem to apply at all.

but when I do this, it breaks with no ability to continue within decompiled code within the WindowsSelectorImpl class in the JDK.

and if I don't attach, nothing is hit at all.

0

No, you don't need to attach. If you start it in debug, IDE debugger connects automatically. Attach feature is for the processes that you start manually outside of the IDE.

0

that's what I thought... did this as a consequence of the breakpoints not getting hit running "normally".

0

See if you can reproduce it with a dummy hello world type JSF application.

0

Yeah, that's what I'm doing. Thanks.

0

Okay, I believe I determined the problem. The debugger socket address was incorrect.

0

Could you please clarify it for others? IDE starts the app server in debug mode and supplies the debugger arguments automatically. Did you override the arguments from the IDE or what exactly was the issue? Thank you.

0

请先登录再写评论。