-
Notifications
You must be signed in to change notification settings - Fork 12
Trouble Shooting for IDE
This document aims to solve various problems students may encounter when configuring the IDE environment while completing assignments. First, we strongly recommend using the VSCode + Docker environment for development, as it has all the necessary dependencies and plugins configured to avoid many potential issues, please refer to Installation of Docker, VSCode and its extensions. However, if you still want to compile SVF and Software-Security-Analysis from source code in the local environment. The followings are some trouble shooting and issue solutions
This is due to not configuring launch.json
properly. The most important parts are setting "program"
and "args"
. As noted in the comments of launch.json
, you need to strictly follow the instructions in the table when debugging different Labs and Assignments.
ctest -R lab1 -VV
passes tests 1-3 when there is no implementation. This situation generally occurs when the compilation is not successful, and the corresponding executable file is not generated. Make sure that the program is compiled correctly.
This may be due to VSCode's slow indexing as it searches through the paths in c_cpp_properties.json
's includePath
. We need to include the system's include folder, the SVF folder, and the llvm folder. Note that: 1) try to click the error information and it may direct you to the library code and the error may disapear. 2) The dependency search for displaying code and compiling code is independent, which means your code may display errors but can still be compiled.
We recommend installing the CodeLLDB plugin, so you don't need to configure MIMode
, miDebuggerPath
, etc. For details, see Install VSCode Plugins C/C++ and CodeLLDB.
lldb in VSCode might throw the above issue when debugging though the terminal debugging is fine. You could try modifying launch.json by change "type" to "cppdbg" and add "MIMode": "lldb" as shown below to fix the issue when debugging in VSCode using lldb.
This is due to the lack of libzstd
. You can run apt-get install libzstd-dev
in the Ubuntu environment, or brew install zstd
if you are using MacOS.
This may be because llvm 16 is not installed correctly or the path to llvm 16 is not set. You can specify a specific LLVM_DIR
during the cmake phase:
cmake .. -DCMAKE_BUILD_TYPE=Debug -DLLVM_DIR=$LLVM_DIR
This may be because llvm 16 is not installed correctly, or the folder containing llvm 16 does not have permissions. You can check by running echo $LLVM_DIR
. If there is no output, you need to run source env.sh
. If LLVM_DIR
is set and the corresponding path exists, check the permissions of that path. If permissions are insufficient, run chmod +x $LLVM_DIR
, then rebuild.