launch.json 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {
  2. "version": "0.2.0",
  3. "configurations": [
  4. {
  5. "name": "后端服务 (FastAPI)",
  6. "type": "python",
  7. "request": "launch",
  8. "module": "uvicorn",
  9. "args": [
  10. "app.main:app",
  11. "--host=127.0.0.1",
  12. "--port=8000",
  13. "--reload",
  14. "--log-level=info"
  15. ],
  16. "console": "integratedTerminal",
  17. "cwd": "${workspaceFolder}/backend",
  18. "env": {
  19. "PYTHONPATH": "${workspaceFolder}/backend"
  20. }
  21. },
  22. {
  23. "name": "前端服务 (React)",
  24. "type": "node",
  25. "request": "launch",
  26. "runtimeExecutable": "npm",
  27. "runtimeArgs": ["start"],
  28. "console": "integratedTerminal",
  29. "cwd": "${workspaceFolder}/frontend",
  30. "env": {
  31. "BROWSER": "none"
  32. }
  33. }
  34. ],
  35. "compounds": [
  36. {
  37. "name": "🚀 启动前后端项目",
  38. "configurations": [
  39. "后端服务 (FastAPI)",
  40. "前端服务 (React)"
  41. ],
  42. "stopAll": true
  43. }
  44. ]
  45. }