Skip to content

debugging examples in Docker container within vscode on ubuntu #13

Description

@jnorwood

In addition to Intel's info on debugging in vscode, there were a couple of mods I did in devcontainer.json.

"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined", "--device=/dev/dri" ],

added the --device=/dev/dri was required to get access to the GPU devices

uncommented the mounts line

// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.

"mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],

changed my cmake build to remove optimization and add DEBUG mode. Also just using make instead of Ninja

CXX=dpcpp cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_CXX_FLAGS="-O0" -D NODPL=1 ../

I had to change the FPGA devices to FPGA emulator in some projects.

I also had to change from default_device to cpu_device in some projects. The default_device is a GPU, which doesn't work in all the programs.

I'm attaching a launch.json file and my modified devcontainer.json for the examples

vscodefiles.zip

Screenshot from 2021-06-01 15-14-58
Screenshot from 2021-06-01 15-13-51
Screenshot from 2021-06-01 15-08-13

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions