当前位置:网站首页>Debug Jest test cases in VSCode, debug Jest test cases in VSCode, middle note basedir=$(dirname "$" (echo "$0" sed -e -e, s, \ \, / "-e").
Debug Jest test cases in VSCode, debug Jest test cases in VSCode, middle note basedir=$(dirname "$" (echo "$0" sed -e -e, s, \ \, / "-e").
2022-04-23 12:06:00 【scluis】
step
First , without launch.json file , Need to open VsCode Run and debug tab ( Shortcut key Ctrl+Shift+D) establish launch.json file
then , stay launch.json The configuration in is as follows :
{
"version": "0.2.0",
"configurations": [{
"name": "Debug Jest Tests",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/jest/bin/jest.js",
"--runInBand"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": "9229"
}]
}
When the configuration is complete , Added an item for Jest Debugging of , What's shown here Debug Jest Tests That's what we configured name Field .
stay VsCode After the breakpoint is hit in the , Click the green start button or use the debug shortcut F5 Start debugging .
Pit encountered
Once configured launch.json File startup debugging , Always reporting mistakes
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
take launch.json In the document "${workspaceRoot}/node_modules/.bin/jest"
Replace with "${workspaceRoot}/node_modules/jest/bin/jest.js"
Problem solvable .
版权声明
本文为[scluis]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231203125060.html
边栏推荐
- Database Navigator 使用默认MySQL连接提示:The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or repres
- Relu function of activation function
- The fourth chapter is about enabling and disabling the im column storage of table space for im enabled filling objects (IM 4.5)
- 抓包整理————tcp 协议[八]
- 软件测试对于减少程序BUG有多大帮助?
- How to expand the capacity of the server in the 100 million level traffic architecture? Well written!
- Summary of convolution layer and pooling layer
- Master slave replication configuration of MySQL
- ThinkPHP adds image text watermark to generate promotion poster with QR code
- How to count fixed assets and how to generate an asset count report with one click
猜你喜欢
初探 Lambda Powertools TypeScript
Sofa weekly | excellent Committee of the year, contributor of this week, QA of this week
Next. JS static data generation and server-side rendering
Docker MySQL master-slave backup
同态加密技术学习
Resolution due to AMD not found_ ags_ x64. DLL, unable to continue code execution. Reinstallation of the program may solve this problem, Forza horizon 5
The listing of saiweidian Technology Innovation Board broke: a decrease of 26% and the market value of the company was 4.4 billion
Step function of activation function
c# 设置logo图标和快捷方式的图标
Nacos Basics (5): getting started with Nacos configuration
随机推荐
ImportError: libX11. so. 6: cannot open shared object file: No such file or directory
Nacos Basics (5): getting started with Nacos configuration
异步时钟亚稳态 的解决方案——多bit信号
什么是网关
Link sorting of tutorials such as assembly language running environment setting
【Redis 系列】redis 学习十三,Redis 常问简单面试题
IDEA 代码格式化插件Save Actions
获取钉钉考勤机打卡记录
为什么要有包装类,顺便说一说基本数据类型、包装类、String类该如何转换?
魔域来了H5游戏详细图文架设教程
IM表达式的目的(IM 5.2)
宝塔面板命令行帮助教程(包含重置密码)
The fourth chapter is about enabling and disabling the im column storage of table space for im enabled filling objects (IM 4.5)
Force buckle - 1137 Nth teponacci number
Database design of forum system
Chapter 4: enable and disable im column storage for materialized view (IM 4.6)
Chapter 4 specifies the attribute of the inmemory column on the no inmemory table for im enabled filling objects: examples (Part IV of im-4.4)
远程访问家里的树莓派(上)
AI video cloud vs narrowband HD, who is the darling of the video era
Sofa weekly | excellent Committee of the year, contributor of this week, QA of this week