步骤 首先,如果没有launch.json文件,需要打开VsCode的运行和调试选项卡(快捷键Ctrl+Shift+D)创建launch.json文件 然后,在launch.json中配置如下: { "version": "0.2.0", "configurations": [{ "name": "Debug Jest Tests",