How To Debugging Webpack with VS Code | 383 day | 570

At the moment "webpack.config.js" is very popular, with FE build, so how to know what is webpack do, and now I will guide you on how to debugging with webpack on VS CODE.

First of all, you need to open VS CODE and add a "Debugger" in VS CODE like below.

 After done with the above, next we will see a file "launch.js" like below

    "version": "0.2.0",
    "configurations": [
            "type": "node",
            "request": "launch",
            "name": "Launch Webpack",
             "program": "${workspaceFolder}/scripts/build.js"
For more information, visit:
So here we need to focus on "program" because it helps us debug a file we want.
For example:
 "scripts": {
    "start": "node scripts/start.js",
    "build": "node scripts/build.js",
    "test": "node scripts/test.js --env=jsdom"

With the code above in "package.json" I have been created 3 commands "start, build, test", so here I will to debug when executing "yarn build or npm run build". I will set the "program" like this

"program": "${workspaceFolder}/scripts/build.js"

and after you click "Start-Debugging" it is automatically accessed to the script folder and "build.js" to debug.

So I hope the article will help you solve the problem with Webpack.

Top Articles

Bất Đầu Với WebApi Và Dot Net Core (.Net Core)

1254 day
Butter Ngo
Views 8638
Comments 0

Dot Net Core Bearer Token With (JWT) (.Net Core)

1187 day
Butter Ngo
Views 5332
Comments 0

Repository Và Unit Of Work (Entity Framework)

1173 day
Views 4908
Comments 0

Bắt Đầu Với Dot NET Core (.Net Core)

1266 day
Butter Ngo
Views 4330
Comments 0

Top Question

Bi lỗi Invalid Column Name khi sử dụng LinQ (.Net)

1114 day
Bảo Dương
Views 1281
Answers 2


407 day
Views 870
Answers 2

Làm thế nào để lấy information từ token (.Net Core)

503 day
Views 805
Answers 1