Setting up polybar for development is basically the same process as compiling
it from source.
However, we recommend using the
Sanitize cmake build type when
configuring the project:
cmake -DCMAKE_BUILD_TYPE=Debug .. # Or cmake -DCMAKE_BUILD_TYPE=Sanitize ..
This will give you debug symbols in the executable and the
type will also enable the
UndefinedBehaviorSanitizer, which can give you very useful information
about crashes and undefined behavior at runtime.
Since this is a cmake project, most IDEs will have built-in support or a plugin to automatically setup this project.
In addition, the
cmake command creates a
compile_commands.json file in
the build folder, which can be used by many language servers.
If you are using a C++ language server in your editor, it should be as easy as
compile_commands.json into the repo root directory:
ln -s build/compile_commands.json .