launch.json 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. {
  2. // 使用 IntelliSense 了解相关属性。
  3. // 悬停以查看现有属性的描述。
  4. // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
  5. "version": "0.2.0",
  6. "configurations": [
  7. {
  8. "name": "Debug UnitTest",
  9. "type": "node",
  10. "request": "launch",
  11. "runtimeArgs": [
  12. "--inspect-brk",
  13. "${workspaceRoot}/node_modules/.bin/jest",
  14. "${workspaceRoot}/packages/semi-ui/form/", // 需要调试哪个组件,替换文件夹路径即可
  15. "--runInBand",
  16. "--coverage",
  17. "--silent" // ignore warning such as componentWillReceiveProps will be abondon...
  18. ],
  19. "env": {
  20. "NODE_ENV": "test",
  21. // "type": "story" // 调试snapshot快照的时候用这个
  22. "type": "unit" // 调试unitTest的时候用这个
  23. },
  24. "console": "integratedTerminal",
  25. "internalConsoleOptions": "neverOpen",
  26. "port": 9229
  27. },
  28. {
  29. "type": "node",
  30. "request": "launch",
  31. "name": "compile css",
  32. "env": {
  33. "NODE_ENV": "dev"
  34. },
  35. "runtimeExecutable": "node",
  36. "program": "${workspaceFolder}/scripts/build-css.js",
  37. "restart": true,
  38. "console": "integratedTerminal",
  39. "internalConsoleOptions": "neverOpen"
  40. },
  41. {
  42. "type": "node",
  43. "request": "launch",
  44. "runtimeArgs": [
  45. ],
  46. "name": "debug snapshot update",
  47. "env": {
  48. "NODE_ENV": "dev"
  49. },
  50. "runtimeExecutable": "node",
  51. "program": "${workspaceFolder}/scripts/snapshotUpdate.js",
  52. "restart": true,
  53. "console": "integratedTerminal",
  54. },
  55. {
  56. "name": "Debug StorySnapShot",
  57. "type": "node",
  58. "request": "launch",
  59. "runtimeArgs": [
  60. "--inspect-brk",
  61. "${workspaceRoot}/node_modules/.bin/jest",
  62. "--runInBand",
  63. "--silent" // ignore warning such as componentWillReceiveProps will be abondon...
  64. ],
  65. "env": {
  66. "NODE_ENV": "test",
  67. "type": "story"
  68. },
  69. "console": "integratedTerminal",
  70. "internalConsoleOptions": "neverOpen",
  71. "port": 9229
  72. }
  73. ]
  74. }