How to develop envoy in CLion with bazel plugin

- 1 min

Install

You’ll need:

Debugging project

  1. Launch CLion
  2. Import envoy via bazel plugin
  3. Select WORKSPACE file envoy/WORKSPACE
  4. Next
  5. Select BUILD file envoy/BUILD
  6. Wait for project to synchronize
  7. Add run configuration
    Target expression: //source/exe:envoy-static
    Bazel command: run
    Bazel flags: -c dbg --spawn_strategy=standalone
    Executable flags: --config-path PATH_TO_ENVOY_CONFIG -l debug
    

    run configuration

  8. Set symbolic breakpoints (only those work, but it’s better than nothing) symbolic breakpoints clion

  9. Click debug
  10. Debugger should stop on in the main function debugger
Krzysztof Słonka

Krzysztof Słonka

Software engineer at Kong. Pragmatic programmer. Nowadays I mostly write "if err != nil"

rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora