title: VSCode : Images can't be opened when debugging(C++/SFML)
body: <p>I am creating a little online game with SFML (C++). My server is in C++ with SFML and my client is in C++ with SFML.</p>
  
  <p>My problem is quite simple, but I just can't find the answer on Google :</p>
  
  <p>I am using images for my client. I use the SFML functions to load images and it works fine when running the client normally, but when I use the GDB debugger with VScode, it does not load my images and I get this error for each images : </p>
  
  <blockquote>
    <p>Failed to load image "../myImage.png". Reason: Unable to open file</p>
  </blockquote>
  
  <p>Here is my debug configuration file :</p>
  
  <pre><code>{
      // 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}/FarmersBuilds/farmers.launcher",
              "args": [],
              "stopAtEntry": false,
              "cwd": "${workspaceFolder}",
              "environment": [],
              "externalConsole": true,
              "MIMode": "gdb",
              "setupCommands": [
                  {
                      "description": "Enable pretty-printing for gdb",
                      "text": "-enable-pretty-printing",
                      "ignoreFailures": true
                  }
              ]
          }
      ]
  }
  </code></pre>
  
  <p>And here is my build task file (everything works when running the executable generated with this without debugger) :</p>
  
  <pre><code>{
      // See https://go.microsoft.com/fwlink/?LinkId=733558
      // for the documentation about the tasks.json format
      "version": "2.0.0",
      "tasks": [
          {
              "label": "clientbuild",
              "type": "shell",
              "command": "cd FarmersBuilds/BuildObjects; g++ -g -c ../../main.cpp ../../GameScreen.cpp ../../LoginScreen.cpp ../../RegisterScreen.cpp ../../ResourceManager.cpp ../../RoomConnector.cpp ../../ScreenParameters.cpp; g++ -g main.o GameScreen.o LoginScreen.o RegisterScreen.o ResourceManager.o RoomConnector.o ScreenParameters.o -o ../farmers.launcher -lpthread -lsfml-graphics -lsfml-window -lsfml-system -lsfml-network; ../farmers.launcher",
              "group": {
                  "kind": "build",
                  "isDefault": true
              }
          }
      ]
  }
  </code></pre>
  
  <p>Here is an example of a constant I use to define the path of my files :</p>
  
  <pre><code>const std::string PATH_GRASS_FILE = "../grass.png";
  </code></pre>
  
  <p>Here is an example of how I load my images :</p>
  
  <pre><code>if (!loginScreenBackgroundTexture-&gt;loadFromFile(PATH_GRASS_FILE)) { ... }
  </code></pre>
  
  <p>Is there something I need to do to allow debugger to use my images or a paramater I must add in the debugger configuration file?</p>
  
  <p>P.S. I am develeopping on Linux.</p>
  
  <p>Thanks
  Cratebox99</p>