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

Doesn't run the server script passed as src #19

Open
Aranir opened this issue Apr 25, 2016 · 3 comments
Open

Doesn't run the server script passed as src #19

Aranir opened this issue Apr 25, 2016 · 3 comments

Comments

@Aranir
Copy link

Aranir commented Apr 25, 2016

in the terminal the following works:
node-debug build/src/main.js

I therefore assumed the following configuration would lead to the same result:

    gulp.src(['build/src/main.js'])
    .pipe(nodeInspector());

but I only get the following output:

[11:23:26] gulp-node-inspector is using node-inspector v0.12.8
[11:23:26] Visit http://127.0.0.1:8080/?port=5858 to start debugging.

Without the server starting, the debugger is running but no sources are available and when I navigate to the server port (localhost:3000), it is not reachable.

What is required to do to get the exact same behavior as using the node-debug command in the terminal?

@javaguy
Copy link

javaguy commented Jun 18, 2016

@Aranir did you figure this out? I'm having the same problem.

@Aranir
Copy link
Author

Aranir commented Jun 18, 2016

@javaguy No I'm sorry haven't investigate further. I had to focus back on my core project which uses another build tool. I hope you will figure it out!

@javaguy
Copy link

javaguy commented Jun 20, 2016

The issue here is that in addition to running node-inspector, node also needs to be run in debug mode. I was using gulp-live-server, and here is my config to get it to run. The following should have the same behavior as node-debug myserverscript.js:

gulp.task('debug', function() {
    // Enable debugging with node-inspector
    gulp.src([])
        .pipe(nodeInspector({
      debugPort: 5858,
      saveLiveEdit: true
    }));

    // Start the server and set the debug flag
    server = gls.new(['--debug', 'myserverscript.js'], undefined, false);
    server.start();
});

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

2 participants