使用 Chutzpah 时打字稿断点失败
Typescript Breakpoints Fail when using Chutzpah
根据关于 Github Compile
配置元素的 Chutzpah 文档。
This setting lets you describe in the Chutzpah.json file how to execute a command which can compile your source files to .js files. You tell Chutzpah what to execute and some information about what your executable does (like where to find the generated .js files). Then after running the executable Chutzpah can associate each source file with each output file to still give the nice behavior of mapping tests back to their original files.
我认为这意味着 js.map
文件被正确使用,因此原始 TS 源代码中的断点应该有效。
其他一切正常。
当我在 Typescript 单元测试中放置断点时,它在 Test->Debug->All Tests
时无法中断。
右键单击并选择 Chutzpah 菜单项 Open in Browser
时也无法中断
根据 Chutzpah 的作者。
Chutzpah does not support the VS debugger.
映射文件允许单击测试资源管理器并将焦点放在 TypesScript 文件中的正确测试上。
Chutzpah 4.1.0 版增加了集成 VS debugging。您可以在 JS 文件中设置断点(如果您生成源映射,也可以使用 TypeScript)并使用上下文菜单中的 Visual Studio 调试器启动:
根据关于 Github Compile
配置元素的 Chutzpah 文档。
This setting lets you describe in the Chutzpah.json file how to execute a command which can compile your source files to .js files. You tell Chutzpah what to execute and some information about what your executable does (like where to find the generated .js files). Then after running the executable Chutzpah can associate each source file with each output file to still give the nice behavior of mapping tests back to their original files.
我认为这意味着 js.map
文件被正确使用,因此原始 TS 源代码中的断点应该有效。
其他一切正常。
当我在 Typescript 单元测试中放置断点时,它在 Test->Debug->All Tests
时无法中断。
右键单击并选择 Chutzpah 菜单项 Open in Browser
根据 Chutzpah 的作者。
Chutzpah does not support the VS debugger.
映射文件允许单击测试资源管理器并将焦点放在 TypesScript 文件中的正确测试上。
Chutzpah 4.1.0 版增加了集成 VS debugging。您可以在 JS 文件中设置断点(如果您生成源映射,也可以使用 TypeScript)并使用上下文菜单中的 Visual Studio 调试器启动: