teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

検証用のソースを追加

2018/10/07 04:58

投稿

morinatsu
morinatsu

スコア395

answer CHANGED
@@ -5,4 +5,78 @@
5
5
  "stopOnEntry":true,
6
6
  ```
7
7
 
8
- VS Codeであれば、`launch.json`自体にもシンタックスハイライトが利くので、怪しいところを探してみてください。
8
+ VS Codeであれば、`launch.json`自体にもシンタックスハイライトが利くので、怪しいところを探してみてください。
9
+
10
+ ---
11
+ ### 追記
12
+
13
+ 私の`launch.json`です。見ての通り`stopOnEntry`は付けておりません(そもそもデフォルトから変えていません)。が、設定したブレークポイントで停止します。
14
+
15
+
16
+ ```json
17
+ {
18
+ // Use IntelliSense to learn about possible attributes.
19
+ // Hover to view descriptions of existing attributes.
20
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
21
+ "version": "0.2.0",
22
+ "configurations": [
23
+ {
24
+ "name": "Python: Current File (Integrated Terminal)",
25
+ "type": "python",
26
+ "request": "launch",
27
+ "program": "${file}",
28
+ "console": "integratedTerminal"
29
+ },
30
+ {
31
+ "name": "Python: Attach",
32
+ "type": "python",
33
+ "request": "attach",
34
+ "port": 5678,
35
+ "host": "localhost"
36
+ },
37
+ {
38
+ "name": "Python: Django",
39
+ "type": "python",
40
+ "request": "launch",
41
+ "program": "${workspaceFolder}/manage.py",
42
+ "console": "integratedTerminal",
43
+ "args": [
44
+ "runserver",
45
+ "--noreload",
46
+ "--nothreading"
47
+ ],
48
+ "django": true
49
+ },
50
+ {
51
+ "name": "Python: Flask",
52
+ "type": "python",
53
+ "request": "launch",
54
+ "module": "flask",
55
+ "env": {
56
+ "FLASK_APP": "app.py"
57
+ },
58
+ "args": [
59
+ "run",
60
+ "--no-debugger",
61
+ "--no-reload"
62
+ ],
63
+ "jinja": true
64
+ },
65
+ {
66
+ "name": "Python: Current File (External Terminal)",
67
+ "type": "python",
68
+ "request": "launch",
69
+ "program": "${file}",
70
+ "console": "externalTerminal"
71
+ }
72
+ ]
73
+ }
74
+ ```
75
+
76
+ ちなみに、検証用に用意したソース(`temp.py`)はこちら。
77
+
78
+ ```python
79
+ print('Hello')
80
+ print('World')
81
+ print('Again')
82
+ ```