質問編集履歴

3

情報追加

2019/03/30 22:52

投稿

torimingo
torimingo

スコア122

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,20 @@
1
- LinuxのVisual Studio Codeで、メニューの「デバッグ」のなかにある「デバッグの開始」を選択すると、ターミナルに以下が出力され、実行ファイルが実行されません。
1
+ LinuxのVisual Studio Codeで、メニューの「デバッグ」のなかにある「デバッグの開始」を選択すると、ターミナルに以下が出力され、正常に実行されません。
2
+
3
+
4
+
5
+ ターミナルで以下が出力され、
6
+
7
+ ```
8
+
9
+ > Executing task in folder visual_studio_code: /usr/bin/g++-7 -g /home/username/test/main.cpp -o /home/username/test/main <
10
+
11
+
12
+
13
+ ターミナルはタスクで再利用されます、閉じるには任意のキーを押してください。
14
+
15
+ ```
16
+
17
+ 上記のターミナルを閉じると、新たにターミナルが現れ、以下が出力されます。
2
18
 
3
19
  ```
4
20
 

2

追記

2019/03/30 22:52

投稿

torimingo
torimingo

スコア122

test CHANGED
File without changes
test CHANGED
@@ -15,3 +15,115 @@
15
15
 
16
16
 
17
17
  tasks.jsonか、launch.jsonを書き換えれば、いいのでしょうか?
18
+
19
+
20
+
21
+ tasks.json
22
+
23
+ ```
24
+
25
+ {
26
+
27
+ "tasks": [
28
+
29
+ {
30
+
31
+ "type": "shell",
32
+
33
+ "label": "g++-7 build active file",
34
+
35
+ "command": "/usr/bin/g++-7",
36
+
37
+ "args": [
38
+
39
+ "-g",
40
+
41
+ "${file}",
42
+
43
+ "-o",
44
+
45
+ "${fileDirname}/${fileBasenameNoExtension}"
46
+
47
+ ],
48
+
49
+ "options": {
50
+
51
+ "cwd": "/usr/bin"
52
+
53
+ }
54
+
55
+ }
56
+
57
+ ],
58
+
59
+ "version": "2.0.0"
60
+
61
+ }
62
+
63
+ ```
64
+
65
+
66
+
67
+ launch.json
68
+
69
+ ```
70
+
71
+ {
72
+
73
+ // IntelliSense を使用して利用可能な属性を学べます。
74
+
75
+ // 既存の属性の説明をホバーして表示します。
76
+
77
+ // 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387
78
+
79
+ "version": "0.2.0",
80
+
81
+ "configurations": [
82
+
83
+ {
84
+
85
+ "name": "g++-7 build and debug active file",
86
+
87
+ "type": "cppdbg",
88
+
89
+ "request": "launch",
90
+
91
+ "program": "${fileDirname}/${fileBasenameNoExtension}",
92
+
93
+ "args": [],
94
+
95
+ "stopAtEntry": false,
96
+
97
+ "cwd": "${workspaceFolder}",
98
+
99
+ "environment": [],
100
+
101
+ "externalConsole": false,
102
+
103
+ "MIMode": "gdb",
104
+
105
+ "setupCommands": [
106
+
107
+ {
108
+
109
+ "description": "Enable pretty-printing for gdb",
110
+
111
+ "text": "-enable-pretty-printing",
112
+
113
+ "ignoreFailures": true
114
+
115
+ }
116
+
117
+ ],
118
+
119
+ "preLaunchTask": "g++-7 build active file",
120
+
121
+ "miDebuggerPath": "/usr/bin/gdb"
122
+
123
+ }
124
+
125
+ ]
126
+
127
+ }
128
+
129
+ ```

1

言語追加

2019/03/30 07:14

投稿

torimingo
torimingo

スコア122

test CHANGED
@@ -1 +1 @@
1
- Linux版 Visual Studio Codeで、デバッグが開始できない
1
+ Linux版 Visual Studio Codeで、C言語のコードが、デバッグできない
test CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  ```
10
10
 
11
- 対象のコードは、hello worldを出力する簡単なものです。
11
+ 対象のコード(C言語)は、hello worldを出力する簡単なものです。
12
12
 
13
13
  実行ファイルは生成されていて、コンソールから実行すれば、正常にhello worldが出力されます。
14
14