当前位置:网站首页>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
边栏推荐
- IM表达式如何工作(5.3)
- kettle复制记录到结果和从结果获取记录使用
- 第五章 使用In-Memory表达式优化查询(IM 5.1)
- Chapter 4 is a tutorial on forced filling of in memory objects with IM enabled filling objects (IM 4.7)
- [web daily practice] eight color puzzle (float)
- Running error: unable to find or load the main class com xxx. Application
- How to count fixed assets and how to generate an asset count report with one click
- Application of remote integrated monitoring system in power distribution room in 10kV prefabricated cabin project
- 程序员如何用130行代码敲定核酸统计
- The fourth chapter is about enabling and disabling the im column storage of table space for im enabled filling objects (IM 4.5)
猜你喜欢

Sofa weekly | excellent Committee of the year, contributor of this week, QA of this week

C# F23. Stringsimilarity Library: String repeatability, text similarity, anti plagiarism

怎么进行固定资产盘点,资产盘点报告如何一键生成

Nacos Foundation (8): login management

Idea database navigator plug-in

魔域来了H5游戏详细图文架设教程

论文解读(CGC)《CGC: Contrastive Graph Clustering for Community Detection and Tracking》

宝塔面板命令行帮助教程(包含重置密码)

Application of remote integrated monitoring system in power distribution room in 10kV prefabricated cabin project

编程辅助工具推荐:图片工具snipaste
随机推荐
使用连接组优化连接 (IM 6)
The fourth chapter is the enable and disable columns of IM enabled fill objects (Part III of im-4.3)
Array---
Design and practice of the smallest short website system in the whole network
Sofa weekly | excellent Committee of the year, contributor of this week, QA of this week
How to switch PHP version in Windows 2008 system
WIN10 启动后花屏
Use kettle to copy records to and get records from results
第四章 为IM 启用填充对象之为IM列存储启用ADO(IM 4.8)
数据库如何填充IM表达式(IM 5.4)
Siri gave the most embarrassing social death moment of the year
第四章 为IM 启用填充对象之强制填充In-Memory对象:教程(IM 4.7)
SQL 练习(一)
宝塔面板命令行帮助教程(包含重置密码)
Tensorflow uses keras to create neural networks
Nacos Foundation (6): Nacos configuration management model
How the database fills in IM expressions (IM 5.4)
对称加密、证书加密
golang之笔试题&面试题01
软件测试对于减少程序BUG有多大帮助?