Debugging your JET Command Line Build Scripts By Duncan Mills


The JET ojet command line tool provides you with a bunch of helpful capabilities ranging from scaffolding applications through to running them.  One of the features that I use extensively is the ability to decorate the build and serve functions with custom hooks. If you are not familiar with this feature have a look in the /scripts/hooks folder of your JET project and you will see a set of after_* and before_* javascript files that will be run when you issue a command such as "ojet serve web".

The default implementation of these hook scripts are empty but they are there for you to carry out any extra tasks that you might want to complete as part of the standard build or build-serve processes. For example you might want to automatically package your /web output directory into a WAR file every time that you do a release build so that you can then deploy that artefact to an application server.

Now, as with any programming, it’s just possible that you might make a mistake and need to be able to debug these hooks scripts.  There is only so much that you can do with console.log() after all! 

I use these ojet hook scripts a lot (and occasionally make mistakes), so I though that I’d share my setup for effectively debugging them.  I’m going to explain how to do it, based on my O/S and preferred editing environment for write node code. I’m not telling you that this is the "correct" way to do it, other IDEs and editors are available and of course details will differ from O/S to O/S. However, you should be able to apply the same principle to your chosen combination of O/S and editing environment.

Debugging in My Setup

My preferred environment is OS/X and the editor I use for node javascript is Visual Studio Code, a good all around editor for this kind of thing.  Visual Studio Code is super easy to configure for node debugging and debugging the ojet-cli. Read the complete article here.


Developer Partner Community

For regular information become a member in the WebLogic Partner Community please visit: ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

clip_image003 Blog clip_image005 Twitter clip_image004 LinkedIn image[7][2][2][2] Facebook image Meetups

Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic Community,Oracle,OPN,Jürgen Kress

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.