launch.json 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {
  2. "version": "0.2.0",
  3. "configurations": [
  4. {
  5. "type": "chrome",
  6. "request": "launch",
  7. "name": "omsapp",
  8. "url": "http://localhost:4200/app",
  9. "webRoot": "${workspaceFolder}/omsapp",
  10. "sourceMapPathOverrides": {
  11. // 匹配Angular编译输出路径与实际源码路径
  12. "/app/src/*": "${workspaceFolder}/omsapp/src/*",
  13. "webpack:///./src/*": "${workspaceFolder}/omsapp/src/*",
  14. "webpack:///src/*": "${workspaceFolder}/omsapp/src/*",
  15. // 处理可能的相对路径映射
  16. "../public/app/src/*": "${workspaceFolder}/omsapp/src/*",
  17. "*/src/*": "${workspaceFolder}/omsapp/src/*"
  18. }
  19. },
  20. {
  21. "type": "node",
  22. "request": "launch",
  23. "name": "oms-background",
  24. "skipFiles": ["<node_internals>/**"],
  25. "program": "${workspaceFolder}/oms/src/app.ts",
  26. "runtimeArgs": [
  27. "--require",
  28. "ts-node/register" // This tells Node.js to use ts-node to register a TypeScript transpiler
  29. ],
  30. "args": [], // Optional arguments for your script
  31. "env": {
  32. // You can add environment variables needed by your script here,
  33. "MONGO_URI": "mongodb://oms:oms123.@localhost:27717/omsdb?authSource=admin",
  34. "CLICKHOUSE_HOST": "http://localhost:8123",
  35. "CLICKHOUSE_DATABASE": "omsdb",
  36. "CLICKHOUSE_USER": "ckuser",
  37. "CLICKHOUSE_PASSWORD": "ckpassword"
  38. },
  39. "cwd": "${workspaceFolder}/oms", // Set the current working directory to the 'oms' folder
  40. "console": "integratedTerminal", // Or "internalConsole"
  41. "internalConsoleOptions": "openOnSessionStart"
  42. },
  43. {
  44. "type": "node",
  45. "request": "launch",
  46. "name": "ingestHistoricalData (TS-Node)",
  47. "skipFiles": ["<node_internals>/**"],
  48. "program": "${workspaceFolder}/oms/src/scripts/ingestHistoricalData.ts",
  49. "runtimeArgs": [
  50. "--require",
  51. "ts-node/register" // This tells Node.js to use ts-node to register a TypeScript transpiler
  52. ],
  53. "args": [], // Optional arguments for your script
  54. "env": {
  55. // You can add environment variables needed by your script here,
  56. "MONGO_URI": "mongodb://oms:oms123.@localhost:27717/omsdb",
  57. "CLICKHOUSE_HOST": "http://localhost:8123",
  58. "CLICKHOUSE_DATABASE": "omsdb",
  59. "CLICKHOUSE_USER": "ckuser",
  60. "CLICKHOUSE_PASSWORD": "ckpassword",
  61. "START_DATE": "20250818", // Example date range
  62. "END_DATE": "20250820"
  63. },
  64. "cwd": "${workspaceFolder}/oms", // Set the current working directory to the 'oms' folder
  65. "console": "integratedTerminal", // Or "internalConsole"
  66. "internalConsoleOptions": "openOnSessionStart"
  67. },
  68. {
  69. "type": "node",
  70. "request": "launch",
  71. "name": "test (TS-Node)",
  72. "skipFiles": ["<node_internals>/**"],
  73. "program": "${workspaceFolder}/oms/src/test/test-remote-art.ts",
  74. "runtimeArgs": [
  75. "--require",
  76. "ts-node/register" // This tells Node.js to use ts-node to register a TypeScript transpiler
  77. ],
  78. "args": [], // Optional arguments for your script
  79. "cwd": "${workspaceFolder}/oms", // Set the current working directory to the 'oms' folder
  80. "console": "integratedTerminal", // Or "internalConsole"
  81. "internalConsoleOptions": "openOnSessionStart"
  82. },
  83. {
  84. "type": "node",
  85. "request": "launch",
  86. "name": "active-user-daily-notify (TS-Node)",
  87. "skipFiles": ["<node_internals>/**"],
  88. "program": "${workspaceFolder}/oms/src/scripts/active-user-daily-notify.ts",
  89. "runtimeArgs": [
  90. "--require",
  91. "ts-node/register" // This tells Node.js to use ts-node to register a TypeScript transpiler
  92. ],
  93. "args": [], // Optional arguments for your script
  94. "cwd": "${workspaceFolder}/oms", // Set the current working directory to the 'oms' folder
  95. "console": "integratedTerminal", // Or "internalConsole"
  96. "internalConsoleOptions": "openOnSessionStart"
  97. }
  98. ]
  99. }