intellij icon indicating copy to clipboard operation
intellij copied to clipboard

feat(clion): Add working directory to CLion Run configurations

Open blorente opened this issue 2 years ago • 4 comments

Checklist

  • [ ] I have filed an issue about this change and discussed potential changes with the maintainers.
  • [X] I have received the approval from the maintainers to make this change.
  • [X] This is not a stylistic, refactoring, or cleanup change.

Please note that the maintainers will not be reviewing this change until all checkboxes are ticked. See the Contributions section in the README for more details.

Discussion thread for this change

Issue number: N/A

Description of this change

In CMake CLion, one has the option of setting a working directory under which the binary will be run. This is useful for debugging single binaries (i.e. they need no runfiles) under different contexts.

This PR adds some of that capability to the Bazel plugin by creating a setting for run configurations, and adding it to the Cidr debug process handlers.

Limitations:

  • For now, this only applies to CLion debugging configurations. Other debuggers will have to be modified to use the setting, as well as non-debug configurations.
  • Previously, we defaulted to the runfiles dir as the pwd if there was one. The explicit working dir has precedence over it now.
Screenshot 2023-06-01 at 10 18 53

blorente avatar Jun 01 '23 09:06 blorente

My only concern is that there is a difference between debug and run result now. I know it's mentioned in checkbox's label, but still it may cause some annoyance

tpasternak avatar Jun 05 '23 09:06 tpasternak

@sgowroji or @tpasternak, is there anything that can be done to help push this forwards?

shs96c avatar Aug 15 '24 15:08 shs96c

I'll take a look at this one next week

ujohnny avatar Aug 16 '24 08:08 ujohnny

@shs96c sorry for the delay. Would it be possible for you to just rebase the PR? I think it's ok.

tpasternak avatar Aug 28 '24 10:08 tpasternak

@tpasternak, @blorente has left our team, and rather than bother him I've opened #6698 as a fresh version of this PR.

shs96c avatar Aug 30 '24 16:08 shs96c