Home / Companies / Tinybird / Blog / Post Details
Content Deep Dive

ClickHouse ® tips #2: Debugging ClickHouse ® on Visual Studio Code

Blog post from Tinybird

Post Details
Company
Date Published
Author
Alberto Romeu
Word Count
149
Language
English
Hacker News Points
-
Summary

Debugging ClickHouse® using Visual Studio Code involves building ClickHouse for debugging by adapting the build with specific flags, such as disabling jemalloc, and running ninja for the clickhouse-server and clickhouse-client, which takes less than an hour. To debug, one must install the C++ extension and gdb, create a new run configuration in the .vscode directory, and set breakpoints directly in the editor to run the code from within Visual Studio Code. After making changes to a cpp file, recompilation is straightforward, thanks to the compile_commands.json file in the build folder, which aids in calling ninja to regenerate the ClickHouse binary by recompiling only the dependencies.