Thursday, December 17, 2009

FAQ #2 – How to enable debug information generation for an ADF BC project

Introduction

There is a great amount of debug information generated each time an ADF BC project runs using the BC application module tester. Among such information are the queries executed by the views, the values that are assumed by bind variables, record counts retrieved and so on. The catch is that enabling this valuable information is not done by default!

Main Theme

To demonstrate this FAQ, let's create a sample Fusion Web Application (Web) based on the HR schema. Let's create an Employee entity from the EMPLOYEES table and an Employees view based on the Employee entity. Finally, let's bundle the Employees view in the HrAppModule application module. Now let's test the application module by right-clicking on it in the Application Navigator and selecting Debug.



As you can see, no output debug information is generated when I am testing the application module.



To enable the generation of output debug information, bring up the BC Project Properties dialog – just double click on the Model project – and edit the Run Configuration by selecting Run/Debug/Profile and then clicking on Edit…




In the Edit Run Configuration dialog specify -Djbo.debugoutput=console as a start-up argument in the Java Options edit box and click OK to close both the Edit Run Configuration and Project Properties dialogs.



Now let’s try debugging the application module again. Voilà! All sorts of valuable debug information are generated!
 


Conclusion

Generation of debug information when testing a BC application module with the BC tester is a valuable tool. To enable it all it takes is to specify the "-Djbo.debugoutput=console" java start-up argument for the Run Configuration. So, enable it and watch those debug statements come flying!

Until the next time, keep on JDeveloping!

Code

http://jdeveloperfaq.googlecode.com/files/JDeveloperFAQNo2.rar









No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...