Tuesday, 27 August 2013

How to invoke foreman via Eclipse when debugging

How to invoke foreman via Eclipse when debugging

I'm a big fan of Heroku these days and as such I've been working to port
some of my nodejs applications to their platform. Heroku utilizes an
open-source tool known as foreman to simplify app start/stop etc. It
blackboxes simple tasks such as loading an .env file before launching my
nodejs server.
Now I need to debug and step-through some code locally and my question
revolves around seeking the community's help on how to get the best setup
for a debug configuration.
Question: I have installed nodeclipse to help me debug nodejs code
locally. But when I run my debug configuration I don't know how to get the
benefit of kicking up foreman to load my environment variables from the
.env file. Can someone help me with this?
PS: I know that I could explicitly setup program or node arguments in the
eclipse debug configuration window but that is exactly what I'm trying to
avoid because there is no way that something like that will stay
up-to-date. I am seeking one source of truth for my environment variables
which is the .env file and I'd like to know if someone has good ideas on
how to work that into a debug config launch from eclipse?

No comments:

Post a Comment