質問編集履歴
1
不具合について具体的に書き直しました。また、ソースコードを変更しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,92 +10,73 @@
|
|
10
10
|
### 発生している問題・エラーメッセージ
|
11
11
|
|
12
12
|
```
|
13
|
+
デバッグを行おうとすると「PrelaunchTask'echo'が終了コード1で終了しました。」とエラーが出ます。そのあと「このままデバッグ」を押しても
|
13
|
-
|
14
|
+
"Unable to start debugging. Program path 'C:\\Users\{Username}\Downloads\かだい4.cpp' is missing or invalid.
|
15
|
+
|
16
|
+
GDB failed with message: C:\\Users\{Username}\Downloads\かだい4.cpp: No such file or directory.
|
17
|
+
|
18
|
+
This may occur if the process's executable was changed after the process was started, such as when installing an update. Try re-launching the application or restarting the machine."
|
19
|
+
とエラーメッセージが表示されます。
|
14
20
|
```
|
15
21
|
|
16
22
|
### 該当のソースコード
|
17
23
|
launch.json
|
18
24
|
```C++
|
19
25
|
{
|
20
|
-
// Use IntelliSense to learn about possible attributes.
|
21
|
-
|
26
|
+
{
|
22
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
23
|
-
|
27
|
+
"version": "0.2.0",
|
24
|
-
|
28
|
+
"configurations": [
|
25
|
-
|
29
|
+
{
|
26
|
-
|
30
|
+
"name": "g++.exe - Build and debug active file",
|
27
|
-
|
31
|
+
"type": "cppdbg",
|
28
|
-
|
32
|
+
"request": "launch",
|
29
|
-
|
33
|
+
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
|
30
|
-
|
34
|
+
"args": [],
|
31
|
-
|
35
|
+
"stopAtEntry": false,
|
32
|
-
|
36
|
+
"cwd": "${fileDirname}",
|
33
|
-
|
37
|
+
"environment": [],
|
34
|
-
|
38
|
+
"externalConsole": false,
|
35
|
-
|
39
|
+
"MIMode": "gdb",
|
40
|
+
"miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
|
36
|
-
|
41
|
+
"setupCommands": [
|
37
|
-
|
42
|
+
{
|
38
|
-
|
43
|
+
"description": "Enable pretty-printing for gdb",
|
39
|
-
|
44
|
+
"text": "-enable-pretty-printing",
|
40
|
-
|
45
|
+
"ignoreFailures": true
|
41
|
-
},
|
42
|
-
{
|
43
|
-
"description": "Set Disassembly Flavor to Intel",
|
44
|
-
"text": "-gdb-set disassembly-flavor intel",
|
45
|
-
"ignoreFailures": true
|
46
|
-
|
46
|
+
}
|
47
|
-
|
47
|
+
],
|
48
|
-
|
48
|
+
"preLaunchTask": "echo"
|
49
|
-
"miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe"
|
50
49
|
}
|
51
|
-
|
50
|
+
]
|
52
51
|
}
|
53
52
|
```
|
54
53
|
tasks.json
|
55
54
|
```C++
|
56
55
|
{
|
57
|
-
|
56
|
+
"version": "2.0.0",
|
58
|
-
"tasks": [
|
57
|
+
"tasks": [
|
59
|
-
{
|
58
|
+
{
|
60
|
-
"label": "echo",
|
59
|
+
"label": "echo",
|
61
|
-
"type": "shell",
|
60
|
+
"type": "shell",
|
62
|
-
"command": "gcc",
|
61
|
+
"command": "gcc",
|
63
|
-
"args": [
|
62
|
+
"args": [
|
64
|
-
"-g",
|
63
|
+
"-g",
|
65
|
-
"${fileBasename}"
|
64
|
+
"${fileDirname}\\${fileBasename}"
|
66
|
-
],
|
65
|
+
],
|
67
|
-
"group": {
|
66
|
+
"group": {
|
68
|
-
"kind": "build",
|
67
|
+
"kind": "build",
|
69
|
-
"isDefault": true
|
68
|
+
"isDefault": true
|
70
|
-
}
|
69
|
+
}
|
71
|
-
},
|
72
|
-
{
|
73
|
-
"type": "cppbuild",
|
74
|
-
"label": "C/C++: cpp.exe アクティブなファイルのビルド",
|
75
|
-
"command": "C:\\MinGW\\bin\\cpp.exe",
|
76
|
-
"args": [
|
77
|
-
"-fdiagnostics-color=always",
|
78
|
-
"-g",
|
79
|
-
"${fileDirname}\\${fileBasenameNoExtension}.exe"
|
80
|
-
],
|
81
|
-
"options": {
|
82
|
-
"cwd": "${fileDirname}"
|
83
|
-
},
|
84
|
-
"problemMatcher": [
|
85
|
-
"$gcc"
|
86
|
-
],
|
87
|
-
"group": "build",
|
88
|
-
"detail": "コンパイラ: C:\\MinGW\\bin\\cpp.exe"
|
89
|
-
}
|
70
|
+
}
|
90
|
-
]
|
71
|
+
]
|
91
72
|
}
|
92
73
|
```
|
93
74
|
|
94
75
|
### 試したこと
|
95
76
|
|
96
|
-
|
77
|
+
怪しい変数を指定していないか等を検討しました。
|
97
78
|
|
98
79
|
### 補足情報(FW/ツールのバージョンなど)
|
99
80
|
|
100
|
-
環境:Windows10
|
81
|
+
環境:Windows10
|
101
82
|
|