From 8a19b5f63a27a09ad20642a23f720eaeeba67bdf Mon Sep 17 00:00:00 2001 From: OrangeX4 <34951714+OrangeX4@users.noreply.github.com> Date: Mon, 16 Nov 2020 22:49:36 +0800 Subject: [PATCH 1/2] Update tasks.json --- AutoVScodeCEnvironment/Resources/tasks.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AutoVScodeCEnvironment/Resources/tasks.json b/AutoVScodeCEnvironment/Resources/tasks.json index f71c05d..cadb01a 100644 --- a/AutoVScodeCEnvironment/Resources/tasks.json +++ b/AutoVScodeCEnvironment/Resources/tasks.json @@ -13,7 +13,7 @@ "args": ["-g", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe"], "problemMatcher": { "owner": "cpp", - "fileLocation": ["relative", "${workspaceRoot}"], + "fileLocation": ["autoDetect", "${workspaceRoot}"], "pattern": { "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, @@ -23,4 +23,4 @@ "message": 5 } } -} \ No newline at end of file +} From 3713f39162b994cd197726cef1501c91f9d35132 Mon Sep 17 00:00:00 2001 From: OrangeX4 <34951714+OrangeX4@users.noreply.github.com> Date: Mon, 16 Nov 2020 22:50:07 +0800 Subject: [PATCH 2/2] Update launch.json --- AutoVScodeCEnvironment/Resources/launch.json | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/AutoVScodeCEnvironment/Resources/launch.json b/AutoVScodeCEnvironment/Resources/launch.json index 46425bb..7dad1dc 100644 --- a/AutoVScodeCEnvironment/Resources/launch.json +++ b/AutoVScodeCEnvironment/Resources/launch.json @@ -6,13 +6,19 @@ "type": "cppdbg", "request": "launch", "targetArchitecture": "x86", - "program": "${fileDirname}\\${fileBasenameNoExtension}.exe", + "program": "C:\\Windows\\system32\\cmd.exe", + "args": [ + "/C", + "${fileDirname}\\${fileBasenameNoExtension}.exe", + "&", + "pause", + ">nul" + ], "miDebuggerPath": "c:\\MinGW\\bin\\gdb.exe", - "args": [], "stopAtEntry": false, "cwd": "${fileDirname}", "externalConsole": true, "preLaunchTask": "g++" } ] -} \ No newline at end of file +}