开发者

How can i debug code that invoked with java reflection?

开发者 https://www.devze.com 2022-12-15 01:13 出处:网络
I h开发者_JAVA技巧ava an application which deployed on J2EE application server , inside the application there is implementation of class loader loading jar files into the JVM, inside those jar files t

I h开发者_JAVA技巧ava an application which deployed on J2EE application server , inside the application there is implementation of class loader loading jar files into the JVM, inside those jar files there are Test Cases which implements common interface, by java reflection i dynamically invoke (by name) those test cases, the problem is that is like a black box and if test case fails i need to work hard to find what went worng throw the application server logger , is there any way to debug the test cases code? or any suggestion at all? thank you sorry for the long story..


You should be able to use Java's remote debugging facility. I've done something similar before and I would simply set a breakpoint in the test that failed. This page describes how to set up remote debugging in eclipse. How you enable debugging depends on the app server you're using.


You can connect to a remote Java EE app server with IntelliJ and step through the code line by line.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号