make debugger work

pull/7102/head
Nils Dijk 2021-09-13 19:28:04 +02:00
parent 93174e6793
commit c094bced08
3 changed files with 40 additions and 1 deletions

View File

@ -64,6 +64,11 @@ RUN sudo apt update && sudo apt install -y \
RUN sudo locale-gen en_US.UTF-8
RUN sudo apt update && sudo apt install -y \
pspg \
uncrustify \
&& sudo apt clean
# bin directory for user tools
RUN mkdir .bin
ENV PATH="/home/citus/.bin:${PATH}"
@ -72,6 +77,7 @@ ENV PATH="/home/citus/.bin:${PATH}"
RUN git clone https://github.com/citusdata/tools.git citus-tools
RUN pip3 install -r citus-tools/citus_dev/requirements.txt
RUN ln -s /home/citus/citus-tools/citus_dev/citus_dev .bin/
RUN sudo make -C citus-tools/uncrustify install bindir=/usr/local/bin pkgsysconfdir=/usr/local/etc/
# TODO add citus_indent
@ -85,3 +91,8 @@ RUN sudo mkdir /data
RUN sudo chown citus:citus /data
COPY --chown=citus:citus .psqlrc .
RUN sudo apt update && sudo apt install -y \
gdb \
&& sudo apt clean

View File

@ -1,3 +1,8 @@
{
"build": { "dockerfile": "Dockerfile" },
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
"forwardPorts": [9700],
"extensions": [
"ms-vscode.cpptools",
],
}

23
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,23 @@
{
// 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": [
{
"type": "cppdbg",
"name": "Attach Citus (devcontainer)",
"request": "attach",
"program": "/home/citus/.pgenv/pgsql/bin/postgres",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
},
]
}