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

Golang Test Debugger runs with PWD being the project root #2213

Closed
drastawi opened this issue Nov 16, 2020 · 2 comments · Fixed by #6748
Closed

Golang Test Debugger runs with PWD being the project root #2213

drastawi opened this issue Nov 16, 2020 · 2 comments · Fixed by #6748
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues lang: go Go rules integration product: GoLand GoLand plugin topic: debugging Issues related to debugging topic: testing type: bug

Comments

@drastawi
Copy link

The tests should execute in the build directory.

Right now when you "run" a test with the "run" button, it will use the build directory (bazel-out/k8-dbg/bin/...) and use the command bazel test. If you run with the "debug" button it will run in the project root and with the bazel run command.

@mai93 mai93 added topic: debugging Issues related to debugging lang: go Go rules integration labels Feb 11, 2021
@rodrigodiez
Copy link

Can replicate this on:

  • GoLand Version 2021.1.3
  • GoLand Bazel Plugin Version 2021.08.24.0.0-api-version-211

@simontoens
Copy link

Hi @rodrigodiez I upgraded to the latest GoLand (GoLand 2021.2.4 Build #GO-212.5457.54, built on October 15, 2021) and Bazel Plugin (2021.10.19.0.1-api-version-212) and I am also seeing this (I am seeing the same behavior with IJ). This bug makes it difficult to debug tests that load files using a relative path.

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: go Go rules integration product: GoLand GoLand plugin topic: debugging Issues related to debugging topic: testing type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants