当前位置:网站首页>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
边栏推荐
- How do programmers finalize nucleic acid statistics with 130 lines of code
- On lambda powertools typescript
- 编程辅助工具推荐:图片工具snipaste
- 对称加密、证书加密
- 第二十五课 类的静态成员变量
- 如果你是一个Golang面试官,你会问哪些问题?
- 九十八、freemarker框架报错 s.e.ErrorMvcAutoConfiguration$StaticView : Cannot render error page for request
- User interface and im expression (IM 5.6)
- 使用连接组优化连接 (IM 6)
- 5个免费音频素材网站,建议收藏
猜你喜欢
5分钟NLP:Text-To-Text Transfer Transformer (T5)统一的文本到文本任务模型
2022 love analysis · panoramic report of industrial Internet manufacturers
Tips for installing MySQL service in windows11: Install / Remove of the Service denied
怎么进行固定资产盘点,资产盘点报告如何一键生成
Xinwangda announced that the price of battery products had been increased, and the investment of "weixiaoli" exceeded 1 billion
Fastjson 2 is coming, the performance continues to improve, and it can fight for another ten years
Step function of activation function
VMware虚拟机使用esxi 导出硬盘vmdk文件
Siri gave the most embarrassing social death moment of the year
科创人·派拉软件CEO谭翔:零信任本质是数字安全,To B也要深研用户心智
随机推荐
Idea code quality specification plug-in sonarlint
Running error: unable to find or load the main class com xxx. Application
2022 love analysis · panoramic report of industrial Internet manufacturers
1.Electron开发环境搭建
How do programmers finalize nucleic acid statistics with 130 lines of code
Win10 splash screen after startup
Database design of simple voting system
智能多线弹性云增加独立的IP地址,如何实现多线功能?
对称加密、证书加密
How to expand the capacity of the server in the 100 million level traffic architecture? Well written!
worder字体网页字体对照表
Castle. Dynamic proxy implements transaction unit control
关于使用Go语言创建WebSocket服务浅谈
On lambda powertools typescript
Nacos Foundation (8): login management
初探 Lambda Powertools TypeScript
第二十五课 类的静态成员变量
MySQL 的主从复制配置
oh-my-lotto
为什么要有包装类,顺便说一说基本数据类型、包装类、String类该如何转换?