You're reading an old version of this documentation. For the latest released version, please have a look at v5.0.3.
CADET-Core debuggingΒΆ
We advice to use an IDE like MS Visual Studio to debug CADET-Core.
If the debugger does not stop at a breakpoint even though it is set in the correct source file, this might be because a corresponding libcadet file was build and is being run. You can find these files under build/src/libcadet. Alternatively, you can set a breakpoint in an early stage, e.g. in the driver file and manually step through the code.
To run a specific simulation with the Visual Studio debugguer, you can add the launch.vs.json file provided here to the .vs folder
{
"version": "0.2.1",
"defaults": {},
"configurations": [
{
"type": "default",
"project": "CMakeLists.txt",
"projectTarget": "cadet-cli.exe (Install) (bin/cadet-cli.exe)",
"name": "CoreDebug.txt",
"args": [
"path_to_setup_file/model.h5>"
]
}
]
}
To debug memory related issues, you can compile the code with the address sanitizer ASAN and the undefined behaviour sanitizer UBSAN by enabling the cmake arguments DENABLE_ASAN and DENABLE_UBSAN.