Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting the --run_under Bazel flag in run configurations breaks debugging in CLion #5770

Closed
dieortin opened this issue Nov 23, 2023 · 0 comments · Fixed by #5771
Closed

Setting the --run_under Bazel flag in run configurations breaks debugging in CLion #5770

dieortin opened this issue Nov 23, 2023 · 0 comments · Fixed by #5771
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues lang: c++ C++ rules integration product: CLion CLion plugin topic: debugging Issues related to debugging type: bug

Comments

@dieortin
Copy link

Description of the bug:

When the --run_under flag is set to some value in the "Bazel flags" section of a run configuration, the debugger fails to launch with a timeout error.

This flag is commonly used to run targets with some specific environment variables, as the run configurations dialogue does not provide this functionality (#2042).

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

  1. Create a cc_binary target in a BUILD.bazel file
  2. Create a run configuration for that target
  3. Set the --run_under flag in "Bazel flags" (for example: --run_under="DISPLAY=:1")
  4. Click the debug button for the target
  5. Observe the debugger failing with a timeout

Which Intellij IDE are you using? Please provide the specific version.

CLion 2023.2.2

What programming languages and tools are you using? Please provide specific versions.

C++17

What Bazel plugin version are you using?

2023.10.24.0.2-api-version-232

Have you found anything relevant by searching the web?

#863
#2042

Any other information, logs, or outputs that you want to share?

No response

@dieortin dieortin added awaiting-maintainer Awaiting review from Bazel team on issues type: bug labels Nov 23, 2023
ujohnny added a commit to ujohnny/intellij that referenced this issue Nov 24, 2023
ujohnny added a commit to ujohnny/intellij that referenced this issue Nov 24, 2023
@sgowroji sgowroji added product: CLion CLion plugin topic: debugging Issues related to debugging labels Nov 27, 2023
@sgowroji sgowroji added the lang: c++ C++ rules integration label Nov 27, 2023
ujohnny added a commit to ujohnny/intellij that referenced this issue Nov 29, 2023
ujohnny added a commit to ujohnny/intellij that referenced this issue Nov 30, 2023
BlazeCidrLauncher is aware of environment variables configured in run
configuration window. So far it looks like no one just forwarded these
variables down to executable process for some unknown reason.

fixes bazelbuild#5770
tpasternak pushed a commit that referenced this issue Dec 11, 2023
BlazeCidrLauncher is aware of environment variables configured in run
configuration window. So far it looks like no one just forwarded these
variables down to executable process for some unknown reason.

fixes #5770
@github-project-automation github-project-automation bot moved this from Untriaged to Done in Bazel IntelliJ Plugin Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-maintainer Awaiting review from Bazel team on issues lang: c++ C++ rules integration product: CLion CLion plugin topic: debugging Issues related to debugging type: bug
Projects
Development

Successfully merging a pull request may close this issue.

5 participants