当前位置:网站首页>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
边栏推荐
- Here comes the detailed picture and text installation tutorial of H5 game
- Master slave replication configuration of MySQL
- 欣旺达宣布电池产品涨价 此前获“蔚小理”投资超10亿
- Intelligent multi line elastic cloud adds independent IP address. How to realize multi line function?
- Link sorting of tutorials such as assembly language running environment setting
- In idea Solution to the problem of garbled code in Chinese display of properties file
- Nacos Foundation (9): Nacos configuration management from single architecture to microservices
- 初探 Lambda Powertools TypeScript
- 第四章 为IM 启用填充对象之启用和禁用表空间的IM列存储(IM 4.5)
- 5分钟NLP:Text-To-Text Transfer Transformer (T5)统一的文本到文本任务模型
猜你喜欢

【Redis 系列】redis 学习十三,Redis 常问简单面试题

如果你是一个Golang面试官,你会问哪些问题?

Metalama简介4.使用Fabric操作项目或命名空间

Design and practice of the smallest short website system in the whole network
Xinwangda announced that the price of battery products had been increased, and the investment of "weixiaoli" exceeded 1 billion

Nacos Foundation (6): Nacos configuration management model

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

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

Idea code quality specification plug-in sonarlint

NativeForMySQL 连接MySQL8 提示:1251- Client does not support authentication protocol
随机推荐
golang之笔试题&面试题01
On lambda powertools typescript
云呐|如何管理好公司的固定资产,固定资产管理怎么做
Cognition and R & D technology of micro robot
Tclerror: no display name and no $display environment variable
力扣-70.爬楼梯
第四章 为IM 启用填充对象之启用和禁用列(IM-4.3 第三部分)
Intelligent multi line elastic cloud adds independent IP address. How to realize multi line function?
c# 设置logo图标和快捷方式的图标
AI video cloud vs narrowband HD, who is the darling of the video era
How Im expressions work (5.3)
ES6学习笔记二
Castle.DynamicProxy实现事务单元控制
Purpose of IM expression (IM 5.2)
画结果图推荐网址
运行报错:找不到或无法加载主类 com.xxx.Application
Nacos Foundation (7): Configuration Management
5个免费音频素材网站,建议收藏
Step function of activation function
Yunna | fixed assets inventory supports multiple inventory methods (asset inventory)