Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Visual Studio Code express app

Đang mở
#641 12 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
express, javascript, node.js, vscode
Lĩnh vực
backend, devtools

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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;
Ngôn ngữ chính
JavaScript
Star
11.5k
Fork
992
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của debug-js/debug

Tất cả issue của debug-js/debug

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.