launch.json 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {
  2. "version": "0.2.0",
  3. "configurations": [
  4. {
  5. "type": "chrome",
  6. "request": "launch",
  7. "name": "omsapp",
  8. // 启动URL必须包含baseHref
  9. "url": "http://localhost:4200/app",
  10. // webRoot指向本地项目根目录
  11. "webRoot": "${workspaceFolder}/omsapp",
  12. "sourceMapPathOverrides": {
  13. // 这是最关键的行:
  14. // 将浏览器URL的 `/app/` 路径,映射到你本地文件系统的根目录。
  15. "/app/*": "${workspaceFolder}/omsapp/*"
  16. }
  17. },
  18. {
  19. "type": "node",
  20. "request": "launch",
  21. "name": "oms-background",
  22. "skipFiles": ["<node_internals>/**"],
  23. "program": "${workspaceFolder}/oms/src/app.ts",
  24. "runtimeArgs": [
  25. "--require",
  26. "ts-node/register" // This tells Node.js to use ts-node to register a TypeScript transpiler
  27. ],
  28. "args": [], // Optional arguments for your script
  29. "env": {
  30. // You can add environment variables needed by your script here,
  31. "MONGO_URI": "mongodb://oms:oms123.@localhost:27717/omsdb?authSource=admin",
  32. "CLICKHOUSE_HOST": "http://localhost:8123",
  33. "CLICKHOUSE_DATABASE": "omsdb",
  34. "CLICKHOUSE_USER": "ckuser",
  35. "CLICKHOUSE_PASSWORD": "ckpassword"
  36. },
  37. "cwd": "${workspaceFolder}/oms", // Set the current working directory to the 'oms' folder
  38. "console": "integratedTerminal", // Or "internalConsole"
  39. "internalConsoleOptions": "openOnSessionStart"
  40. },
  41. {
  42. "type": "node",
  43. "request": "launch",
  44. "name": "ingestHistoricalData (TS-Node)",
  45. "skipFiles": ["<node_internals>/**"],
  46. "program": "${workspaceFolder}/oms/src/scripts/ingestHistoricalData.ts",
  47. "runtimeArgs": [
  48. "--require",
  49. "ts-node/register" // This tells Node.js to use ts-node to register a TypeScript transpiler
  50. ],
  51. "args": [], // Optional arguments for your script
  52. "env": {
  53. // You can add environment variables needed by your script here,
  54. "MONGO_URI": "mongodb://oms:oms123.@localhost:27717/omsdb",
  55. "CLICKHOUSE_HOST": "http://localhost:8123",
  56. "CLICKHOUSE_DATABASE": "omsdb",
  57. "CLICKHOUSE_USER": "ckuser",
  58. "CLICKHOUSE_PASSWORD": "ckpassword",
  59. "START_DATE": "20250818", // Example date range
  60. "END_DATE": "20250820"
  61. },
  62. "cwd": "${workspaceFolder}/oms", // Set the current working directory to the 'oms' folder
  63. "console": "integratedTerminal", // Or "internalConsole"
  64. "internalConsoleOptions": "openOnSessionStart"
  65. },
  66. {
  67. "type": "node",
  68. "request": "launch",
  69. "name": "test (TS-Node)",
  70. "skipFiles": ["<node_internals>/**"],
  71. "program": "${workspaceFolder}/oms/src/test/test-remote-art.ts",
  72. "runtimeArgs": [
  73. "--require",
  74. "ts-node/register" // This tells Node.js to use ts-node to register a TypeScript transpiler
  75. ],
  76. "args": [], // Optional arguments for your script
  77. "cwd": "${workspaceFolder}/oms", // Set the current working directory to the 'oms' folder
  78. "console": "integratedTerminal", // Or "internalConsole"
  79. "internalConsoleOptions": "openOnSessionStart"
  80. },
  81. {
  82. "type": "node",
  83. "request": "launch",
  84. "name": "active-user-daily-notify (TS-Node)",
  85. "skipFiles": ["<node_internals>/**"],
  86. "program": "${workspaceFolder}/oms/src/scripts/active-user-daily-notify.ts",
  87. "runtimeArgs": [
  88. "--require",
  89. "ts-node/register" // This tells Node.js to use ts-node to register a TypeScript transpiler
  90. ],
  91. "args": [], // Optional arguments for your script
  92. "cwd": "${workspaceFolder}/oms", // Set the current working directory to the 'oms' folder
  93. "console": "integratedTerminal", // Or "internalConsole"
  94. "internalConsoleOptions": "openOnSessionStart"
  95. }
  96. ]
  97. }