launch.json 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. {
  2. // 使用 IntelliSense 了解相关属性。
  3. // 悬停以查看现有属性的描述。
  4. // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
  5. "version": "0.2.0",
  6. "configurations": [
  7. {
  8. "name": "Python",
  9. "type": "python",
  10. "request": "launch",
  11. "stopOnEntry": true,
  12. "pythonPath": "${config:python.pythonPath}",
  13. "program": "${file}",
  14. "cwd": "${workspaceRoot}",
  15. "env": {},
  16. "envFile": "${workspaceRoot}/.env",
  17. "debugOptions": [
  18. "WaitOnAbnormalExit",
  19. "WaitOnNormalExit",
  20. "RedirectOutput"
  21. ]
  22. },
  23. {
  24. "name": "PySpark",
  25. "type": "python",
  26. "request": "launch",
  27. "stopOnEntry": true,
  28. "osx": {
  29. "pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
  30. },
  31. "windows": {
  32. "pythonPath": "${env:SPARK_HOME}/bin/spark-submit.cmd"
  33. },
  34. "linux": {
  35. "pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
  36. },
  37. "program": "${file}",
  38. "cwd": "${workspaceRoot}",
  39. "env": {},
  40. "envFile": "${workspaceRoot}/.env",
  41. "debugOptions": [
  42. "WaitOnAbnormalExit",
  43. "WaitOnNormalExit",
  44. "RedirectOutput"
  45. ]
  46. },
  47. {
  48. "name": "Python Module",
  49. "type": "python",
  50. "request": "launch",
  51. "stopOnEntry": true,
  52. "pythonPath": "${config:python.pythonPath}",
  53. "module": "module.name",
  54. "cwd": "${workspaceRoot}",
  55. "env": {},
  56. "envFile": "${workspaceRoot}/.env",
  57. "debugOptions": [
  58. "WaitOnAbnormalExit",
  59. "WaitOnNormalExit",
  60. "RedirectOutput"
  61. ]
  62. },
  63. {
  64. "name": "Integrated Terminal/Console",
  65. "type": "python",
  66. "request": "launch",
  67. "stopOnEntry": true,
  68. "pythonPath": "${config:python.pythonPath}",
  69. "program": "${file}",
  70. "cwd": "",
  71. "console": "integratedTerminal",
  72. "env": {},
  73. "envFile": "${workspaceRoot}/.env",
  74. "debugOptions": [
  75. "WaitOnAbnormalExit",
  76. "WaitOnNormalExit"
  77. ]
  78. },
  79. {
  80. "name": "External Terminal/Console",
  81. "type": "python",
  82. "request": "launch",
  83. "stopOnEntry": true,
  84. "pythonPath": "${config:python.pythonPath}",
  85. "program": "${file}",
  86. "cwd": "",
  87. "console": "externalTerminal",
  88. "env": {},
  89. "envFile": "${workspaceRoot}/.env",
  90. "debugOptions": [
  91. "WaitOnAbnormalExit",
  92. "WaitOnNormalExit"
  93. ]
  94. },
  95. {
  96. "name": "Django",
  97. "type": "python",
  98. "request": "launch",
  99. "stopOnEntry": true,
  100. "pythonPath": "${config:python.pythonPath}",
  101. "program": "${workspaceRoot}/manage.py",
  102. "cwd": "${workspaceRoot}",
  103. "args": [
  104. "runserver",
  105. "--noreload",
  106. "--nothreading"
  107. ],
  108. "env": {},
  109. "envFile": "${workspaceRoot}/.env",
  110. "debugOptions": [
  111. "WaitOnAbnormalExit",
  112. "WaitOnNormalExit",
  113. "RedirectOutput",
  114. "DjangoDebugging"
  115. ]
  116. },
  117. {
  118. "name": "Flask",
  119. "type": "python",
  120. "request": "launch",
  121. "stopOnEntry": false,
  122. "pythonPath": "${config:python.pythonPath}",
  123. "program": "fully qualified path fo 'flask' executable. Generally located along with python interpreter",
  124. "cwd": "${workspaceRoot}",
  125. "env": {
  126. "FLASK_APP": "${workspaceRoot}/quickstart/app.py"
  127. },
  128. "args": [
  129. "run",
  130. "--no-debugger",
  131. "--no-reload"
  132. ],
  133. "envFile": "${workspaceRoot}/.env",
  134. "debugOptions": [
  135. "WaitOnAbnormalExit",
  136. "WaitOnNormalExit",
  137. "RedirectOutput"
  138. ]
  139. },
  140. {
  141. "name": "Flask (old)",
  142. "type": "python",
  143. "request": "launch",
  144. "stopOnEntry": false,
  145. "pythonPath": "${config:python.pythonPath}",
  146. "program": "${workspaceRoot}/run.py",
  147. "cwd": "${workspaceRoot}",
  148. "args": [],
  149. "env": {},
  150. "envFile": "${workspaceRoot}/.env",
  151. "debugOptions": [
  152. "WaitOnAbnormalExit",
  153. "WaitOnNormalExit",
  154. "RedirectOutput"
  155. ]
  156. },
  157. {
  158. "name": "Pyramid",
  159. "type": "python",
  160. "request": "launch",
  161. "stopOnEntry": true,
  162. "pythonPath": "${config:python.pythonPath}",
  163. "cwd": "${workspaceRoot}",
  164. "env": {},
  165. "envFile": "${workspaceRoot}/.env",
  166. "args": [
  167. "${workspaceRoot}/development.ini"
  168. ],
  169. "debugOptions": [
  170. "WaitOnAbnormalExit",
  171. "WaitOnNormalExit",
  172. "RedirectOutput",
  173. "Pyramid"
  174. ]
  175. },
  176. {
  177. "name": "Watson",
  178. "type": "python",
  179. "request": "launch",
  180. "stopOnEntry": true,
  181. "pythonPath": "${config:python.pythonPath}",
  182. "program": "${workspaceRoot}/console.py",
  183. "cwd": "${workspaceRoot}",
  184. "args": [
  185. "dev",
  186. "runserver",
  187. "--noreload=True"
  188. ],
  189. "env": {},
  190. "envFile": "${workspaceRoot}/.env",
  191. "debugOptions": [
  192. "WaitOnAbnormalExit",
  193. "WaitOnNormalExit",
  194. "RedirectOutput"
  195. ]
  196. },
  197. {
  198. "name": "Attach (Remote Debug)",
  199. "type": "python",
  200. "request": "attach",
  201. "localRoot": "${workspaceRoot}",
  202. "remoteRoot": "${workspaceRoot}",
  203. "port": 3000,
  204. "secret": "my_secret",
  205. "host": "localhost"
  206. }
  207. ]
  208. }