Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to debug when tasks are loaded from external project I don't control #20

Open
mbabauer opened this issue Jul 19, 2016 · 0 comments
Open

Comments

@mbabauer
Copy link

I am new to Gulp, and new to this project, but basically I am working on some node code that uses a base project, such that our code gets copied in as a module to theirs. We use gulp to start the app, and I'd like to add a task that will start it using node-inspector instead of plain node, but I am struggling.

In our gulpfile.js I have:

var gulp = require('gulp');
var nodeInspector = require('gulp-node-inspector');

var workflow = require('base-workflow');

workflow.use({
  gulp: gulp
});

gulp.task('default', ['base:default']);
gulp.task('debug', ['default'], function() { gulp.src([]).pipe(nodeInspector()); });

Where base:default is the task we run from the "parent" project, which copies our code in and runs 2 servers, one using Hapi for the web app and another started via gulp-nodemon that serves as a proxy for REST requests (proxies to a Java-based REST app or regurgitates pre-canned simulated responses). I this case, the only thing I want to debug is the Hapi server.

I have tried several iterations of the debug task, but nothing seems to work. If I pass default in as a dependency to the gulp.task('debug'), the app servers start but nothing is in the node-inspector. On the flip side, if I pass default to gulp.src() neither the web server or the REST proxy start, and node-inspector shows nothing.

How do I get node-inspector working when the tasks that start the app are pulled in from a separate gulpfile.js that I have no control over?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant