Debugging is supported for cc_binary and cc_test targets. Simply create a run configuration by right-clicking on a Bazel target or test file/class/function, then run it in debug mode. Detailed instructions here .
cc_binary
cc_test