From 741b3562cc7bf286aed61b093ab7275f5e093e8b Mon Sep 17 00:00:00 2001 From: Nicolas Capens Date: Wed, 27 Sep 2017 10:44:13 -0400 Subject: [PATCH] Build before debugging with Visual Studio Code. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Call make before launching a debug session. Also move from the 'build' subdirectory to the 'debug' subdirectory to allow for a separate release build or other configuration. Change-Id: I6db00a5bb0a707ebbf9c160897852526a8bb73e1 Reviewed-on: https://swiftshader-review.googlesource.com/12528 Reviewed-by: Nicolas Capens Reviewed-by: Alexis Hétu Tested-by: Nicolas Capens --- .vscode/launch.json | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++--- .vscode/tasks.json | 2 +- 2 files changed, 75 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 2200c4b26..c184044b1 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,12 +1,82 @@ { "version": "0.2.0", "configurations": [ - + { + "name": "Gnome", + "type": "cppdbg", + "request": "launch", + "preLaunchTask": "make", + "program": "${workspaceRoot}/debug/OGLESIntroducingPVRApi", + "args": ["LD_LIBRARY_PATH=./"], + "stopAtEntry": false, + "cwd": "${workspaceRoot}/debug/", + "environment": [], + "externalConsole": true, + "linux": { + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + }, + "osx": { + "MIMode": "lldb" + }, + "windows": { + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + }, + { + "name": "Glass", + "type": "cppdbg", + "request": "launch", + "preLaunchTask": "make", + "program": "${workspaceRoot}/debug/OGLESGlass", + "args": ["LD_LIBRARY_PATH=./"], + "stopAtEntry": false, + "cwd": "${workspaceRoot}/debug/", + "environment": [], + "externalConsole": true, + "linux": { + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + }, + "osx": { + "MIMode": "lldb" + }, + "windows": { + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + }, { "name": "SubzeroTest", "type": "cppdbg", "request": "launch", - "program": "${workspaceRoot}/build/SubzeroTest", + "preLaunchTask": "make", + "program": "${workspaceRoot}/debug/SubzeroTest", "args": [], "stopAtEntry": false, "cwd": "${workspaceRoot}", @@ -40,7 +110,8 @@ "name": "OGLES2HelloAPI", "type": "cppdbg", "request": "launch", - "program": "${workspaceRoot}/build/OGLES2HelloAPI", + "preLaunchTask": "make", + "program": "${workspaceRoot}/debug/OGLES2HelloAPI", "args": [], "stopAtEntry": false, "cwd": "${workspaceRoot}", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 71f226ddc..2c00e0633 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -17,7 +17,7 @@ "showOutput": "always", "suppressTaskName": true, "options": { - "cwd": "${workspaceRoot}/build" + "cwd": "${workspaceRoot}/debug" }, "tasks": [ { -- 2.11.0