Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Visual Studio Code express app

Open
#641 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
express, javascript, node.js, vscode
Domain
backend, devtools

Research direction

Start with the launch.json environment configuration and the app.js entry point, then reproduce the Express app in Visual Studio Code with DEBUG set to *. Compare the debug console output for the startup Test 1 message and the request-handler Test 2 message, and document or correct the difference so both expected messages are handled consistently.

Written by the indexing model from the issue text.

Description

help-wanted needs-documentation pr-welcome

I am trying to run an express app through Visual Studio Code. I have a launch.json file with DEBUG defined like so:

        "env": {
             "DEBUG": "*"
        }

Here is a trimmed down version of my app.js file where you can see the bolded debug line that doesn't output to the debug console (Test 2). Test 1 before it outputs as expected. If I run this from the command line passing DEBUG=* npm start both lines show as expected.

var debug = require('debug')('app');
const express = require("express");
const cors = require("cors");
const bodyParser = require("body-parser");
const app = express();
const v1 = require('./routes/v1');

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));

**debug("Test 1 that outputs!");**

app.use(function(req, res, next) {
    console.error("THIS OUTPUTS");
    **debug("Test 2 that doesn't output!!");**
    console.log(`${req.method} request for '${req.url}' - ${JSON.stringify(req.body)}`);
    next();
});

app.use(cors());

app.listen(3000);

console.log("Service running on port 3000");

module.exports = app;
Dominant language
JavaScript
Stars
11.5k
Forks
992
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from debug-js/debug

All issues in debug-js/debug

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.