Hey, I’m new to Nova and fairly new to node and I’m trying to debug a node.js app. I followed the instructions in the documentation on how to do this, however debugger and in app break points just aren’t getting hit.
I should say before I get into it, I’m not sure if this is a node or a Nova question!
I’ve create a really basic node app that’s just a server:
const http = require("http");
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, res) => {
console.log('test')
debugger
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
And I created a new Node.js Debug task in the project settings with Launch as the launch type. I hit the play button and it seems to run, but when I run the application from the terminal (either Nova’s or Terminal app) nothing happens:
Do I need to create an extra script somewhere to get it working?
Thanks!