Node.JS Express Server can not debug javascript

I've created a simple server for an single page app in node.js with express. For reason i cannot debug any javascript.  I`t did not open the debugging panel(close debugging for some reason. I use it as a external tool. I can debug with the integrated server or vs by clicking run and then debug. Same problems with any Node solutions.

Node.Js Server Code

    // modules =================================================
    var express        = require('express');
    var app            = express();

    var i = 0;
    var filePath, directoryPath;
    process.argv.forEach(function (val, index, array) {
        if (i == 2)
            filePath = val;
     if (i == 3)
     directoryPath = val;
        i++;
    });

    app.use(express.static(directoryPath));

    app.get("/*", function(req, res) {
     res.sendFile(filePath.toString());
    });

    // start app ===============================================
    app.listen(8080);



Attachment(s):
6jOjz.png
1 comment
Comment actions Permalink

If you like to debug your express server code, you should have tried Node.js run configuration. JavaScript Debug run configuration is only used for debugging client-side code run in browser.
See https://confluence.jetbrains.com/display/WI/Running+and+debugging+Node.js+application

I'm not also sure why you are using external tools to run Node - can you explain?

0

Please sign in to leave a comment.