From 7c474ba388d4b0383161c0f40bde09f1eee73191 Mon Sep 17 00:00:00 2001 From: Bryan Call Date: Wed, 15 Jul 2020 11:04:21 -0700 Subject: [PATCH 1/8] Added tasks file for vscode, to configure and build ATS --- .vscode/tasks.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .vscode/tasks.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000000..77655a3da7b --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,25 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Build", + "type": "shell", + "command": "make -j 16", + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Configure", + "type": "shell", + "command": "./configure --enable-ccache --enable-experimental-plugins --enable-example-plugins --enable-test-tools --enable-debug --enable-werror", + "problemMatcher": [] + } + ] +} \ No newline at end of file From e6e2b71756f08e77ce737731f26b41f56926ee37 Mon Sep 17 00:00:00 2001 From: Bryan Call Date: Wed, 15 Jul 2020 11:31:15 -0700 Subject: [PATCH 2/8] Added autoreconf to the Configure task --- .vscode/tasks.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 77655a3da7b..f93f1f2059f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -18,7 +18,7 @@ { "label": "Configure", "type": "shell", - "command": "./configure --enable-ccache --enable-experimental-plugins --enable-example-plugins --enable-test-tools --enable-debug --enable-werror", + "command": "autoreconf -if; ./configure --enable-ccache --enable-experimental-plugins --enable-example-plugins --enable-test-tools --enable-debug --enable-werror", "problemMatcher": [] } ] From 4c5e8d6754bfcfac6a8f7148be41768e89520c58 Mon Sep 17 00:00:00 2001 From: Bryan Call Date: Wed, 15 Jul 2020 12:10:33 -0700 Subject: [PATCH 3/8] Changed prefix to /opt/ats, added testing, and debugging configuration --- .vscode/launch.json | 27 +++++++++++++++++++++++++++ .vscode/tasks.json | 43 ++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..59221e872af --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,27 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "(gdb) Launch", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/src/traffic_server/.libs/traffic_server", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index f93f1f2059f..565158f6e2d 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -3,6 +3,20 @@ // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ + { + "label": "Autoreconf", + "type": "shell", + "command": "autoreconf -if", + "problemMatcher": [] + }, + { + "label": "Configure", + "type": "shell", + "command": "./configure --prefix=/opt/ats --enable-ccache --enable-experimental-plugins --enable-example-plugins --enable-test-tools --enable-debug --enable-werror", + "dependsOrder": "sequence", + "dependsOn": ["Autoreconf"], + "problemMatcher": [] + }, { "label": "Build", "type": "shell", @@ -16,10 +30,33 @@ } }, { - "label": "Configure", + "label": "Install", "type": "shell", - "command": "autoreconf -if; ./configure --enable-ccache --enable-experimental-plugins --enable-example-plugins --enable-test-tools --enable-debug --enable-werror", - "problemMatcher": [] + "command": "make -j 16 install", + "problemMatcher": [ + "$gcc" + ] + }, + { + "label": "Test", + "type": "shell", + "command": "make -j 8 test", + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "test", + "isDefault": true + } + }, + // It is good to run this first and then you can run the other tasks + { + "label": "Full Build", + "dependsOrder": "sequence", + "dependsOn": ["Configure", "Build", "Install"], + "problemMatcher": [ + "$gcc" + ] } ] } \ No newline at end of file From 8f0798ead9b587055146a1c7fd01c0afc1251198 Mon Sep 17 00:00:00 2001 From: Bryan Call Date: Wed, 15 Jul 2020 12:13:47 -0700 Subject: [PATCH 4/8] Added newlines --- .vscode/tasks.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 565158f6e2d..dc1a3251559 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -59,4 +59,4 @@ ] } ] -} \ No newline at end of file +} From 498fdcf0450bb28ec542bd72263e4869a44e09b7 Mon Sep 17 00:00:00 2001 From: Bryan Call Date: Wed, 15 Jul 2020 13:46:25 -0700 Subject: [PATCH 5/8] Chagned the PREFIX to be ${workspaceFolder}/target --- .gitignore | 1 + .vscode/tasks.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d46c2aa78a9..bf74465f689 100644 --- a/.gitignore +++ b/.gitignore @@ -170,6 +170,7 @@ rc/trafficserver.service .svn/ .vscode/ +target tsxs diff --git a/.vscode/tasks.json b/.vscode/tasks.json index dc1a3251559..0cadd10c8ce 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -12,7 +12,7 @@ { "label": "Configure", "type": "shell", - "command": "./configure --prefix=/opt/ats --enable-ccache --enable-experimental-plugins --enable-example-plugins --enable-test-tools --enable-debug --enable-werror", + "command": "./configure --prefix=${workspaceFolder}/target --enable-ccache --enable-experimental-plugins --enable-example-plugins --enable-test-tools --enable-debug --enable-werror", "dependsOrder": "sequence", "dependsOn": ["Autoreconf"], "problemMatcher": [] From ac3ed4cc61e46a4d0a7f8ad011ce4783f026de3a Mon Sep 17 00:00:00 2001 From: Bryan Call Date: Wed, 15 Jul 2020 13:49:44 -0700 Subject: [PATCH 6/8] Removed comments --- .vscode/launch.json | 3 --- .vscode/tasks.json | 3 --- 2 files changed, 6 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 59221e872af..e090eba92e4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,7 +1,4 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 0cadd10c8ce..43fd8f8c196 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,6 +1,4 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { @@ -49,7 +47,6 @@ "isDefault": true } }, - // It is good to run this first and then you can run the other tasks { "label": "Full Build", "dependsOrder": "sequence", From 05792d75e1bb57c8570a844bbc148d7d662cb1ee Mon Sep 17 00:00:00 2001 From: Bryan Call Date: Wed, 15 Jul 2020 14:10:11 -0700 Subject: [PATCH 7/8] Added ATS_VSCODE_CONFIGURE for overriding configuration options --- .vscode/launch.json | 2 +- .vscode/tasks.json | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index e090eba92e4..b53ff5283a6 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -21,4 +21,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 43fd8f8c196..acbdf0458e2 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -10,7 +10,7 @@ { "label": "Configure", "type": "shell", - "command": "./configure --prefix=${workspaceFolder}/target --enable-ccache --enable-experimental-plugins --enable-example-plugins --enable-test-tools --enable-debug --enable-werror", + "command": "./configure --prefix=${workspaceFolder}/target --enable-ccache --enable-experimental-plugins --enable-example-plugins --enable-test-tools --enable-debug --enable-werror ${env:ATS_VSCODE_CONFIGURE}", "dependsOrder": "sequence", "dependsOn": ["Autoreconf"], "problemMatcher": [] @@ -55,5 +55,10 @@ "$gcc" ] } + { + "label": "Dump Enviroment Variables", + "command": "env", + "problemMatcher": [] + } ] } From 6c3d3eaa9866a939ce648b3b02997a57ec440fc6 Mon Sep 17 00:00:00 2001 From: Bryan Call Date: Wed, 15 Jul 2020 14:21:21 -0700 Subject: [PATCH 8/8] Added debugging for traffic_manager --- .vscode/launch.json | 21 ++++++++++++++++++++- .vscode/tasks.json | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index b53ff5283a6..32b63427155 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,7 +2,7 @@ "version": "0.2.0", "configurations": [ { - "name": "(gdb) Launch", + "name": "(gdb) traffic_server", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/src/traffic_server/.libs/traffic_server", @@ -19,6 +19,25 @@ "ignoreFailures": true } ] + }, + { + "name": "(gdb) traffic_manager", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/src/traffic_manager/.libs/traffic_manager", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] } ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index acbdf0458e2..20264fce5e1 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -10,7 +10,7 @@ { "label": "Configure", "type": "shell", - "command": "./configure --prefix=${workspaceFolder}/target --enable-ccache --enable-experimental-plugins --enable-example-plugins --enable-test-tools --enable-debug --enable-werror ${env:ATS_VSCODE_CONFIGURE}", + "command": "./configure --prefix=${workspaceFolder}/target --enable-ccache --enable-experimental-plugins --enable-example-plugins --enable-test-tools --enable-debug --enable-werror ${env:ATS_VSCODE_CONFIGURE}", "dependsOrder": "sequence", "dependsOn": ["Autoreconf"], "problemMatcher": []