当前位置:网站首页>How vscode debug nodejs
How vscode debug nodejs
2022-07-24 14:26:00 【Did lemon study today】
node.js Official instructions for commissioning :Debugging - Getting Started | Node.js
The importance of debugging is self-evident , There are also various methods , Here's just one vscode A simple and intuitive method on .
Method 1 : Direct debugging
1. Switch to debugge Pattern , Direct breakpoint debugging ;

Method 2 : By adding a configuration file launch.json To debug ;
1. Click to create directly launch.json:

2. To configure launch.json :
{
// nodemon To configure
"version": "0.2.0",
"configurations": [
{
// Type of debugger
"type": "node",
// Request configuration type , It can be for launch( start-up ) or attach( additional )
"request": "launch",
// Configuration name , It will be displayed in the drop-down menu of startup configuration , The exemption is consistent with other items
"name": "nodemon",
// Set the executable file path at run time , The default is node
"runtimeExecutable": "nodemon",
// The path to the executable or source code to run
"program": "${workspaceFolder}/index.js",
// Whether to actively restart debugging
"restart": true,
// Specify the location of program output : Integrated terminal
"console": "integratedTerminal",
// Define the display of the debug console
"internalConsoleOptions": "neverOpen"
}
]
}3. Make a small red dot in front of the place that needs debugging , Click the green triangle or press F5 Start commissioning :

4. Enter debugging state :

边栏推荐
- Can you buy 6% of financial products after opening a stock account?
- ISPRS2018/云检测:Cloud/shadow detection based on spectral indices for multi/hyp基于光谱指数的多/高光谱光学遥感成像仪云/影检测
- JS judge whether the data is empty
- 达梦实时主备集群搭建
- Notes on the use of IEEE transaction journal template
- [oauth2] III. interpretation of oauth2 configuration
- Overview of dobesie wavelet (DB wavelet function) in wavelet transform
- Remove the treasure box app with the green logo that cannot be deleted from iPhone
- Multithreaded common classes
- sql server语法—创建数据库
猜你喜欢

Jmmert aggregation test report

正则表达和绕过案例

Under multi data source configuration, solve org.apache.ibatis.binding Bindingexception: invalid bound statement (not found) problem

Maotai ice cream "bucked the trend" and became popular, but its cross-border meaning was not "selling ice cream"

Source code analysis of ArrayList

Regular expression and bypass cases

bibliometrix: 从千万篇论文中挖掘出最值得读的那一篇!

mysql

Nessus security testing tool tutorial

Csp2021 T3 palindrome
随机推荐
Number of bytes occupied by variables of type char short int in memory
DDD based on ABP -- Entity creation and update
VSCode如何调试Nodejs
Notes on the use of IEEE transaction journal template
[NLP] next stop, embossed AI
Ztree tree Metro style mouse through the display user-defined controls add, edit, delete, down, up operations
交换
Tensorflow framework of deep learning realizes vgg/rnn network / verification code generation and recognition / text classification
C operator priority memory formula
About the flicker problem caused by using universalimageloader to load pictures and refresh data in recyclerview
Differences between C language pointer and array A and &a, &a[0], etc
电赛设计报告模板及
Mmdrawercontroller gets the current VC for push and pop
mysql
Concurrent programming ----------- set
threw exception [Circular view path [index]: would dispatch back to the current handler URL [/index]
ISPRS2018/云检测:Cloud/shadow detection based on spectral indices for multi/hyp基于光谱指数的多/高光谱光学遥感成像仪云/影检测
CSDN garbage has no bottom line!
Centos7 installs Damon stand-alone database
AtCoder Beginner Contest 261E // 按位思考 + dp