Python debugger shows a wrong file when stopped at a breakpoint
Description of the bug:
No response
Which category does this issue belong to?
Intellij, CLion
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
- Clone a Python project that has tests, for example https://github.com/christianfds/article-simple-bazel
- Import it into IntelliJ with the following project view file:
directories:
.
derive_targets_from_directories: true
targets:
additional_languages:
python
- Open a file with tests, e. g.
libs/complex_calculations/tests/test.py - Follow the IntelliJ prompts to set up a Python venv and install the project requirements.
- Run any test case in the file to make sure that the project is set up correctly.
- Place a breakpoint inside the test case, and launch it with debugging.
Expected behaviour: The execution is suspended, and the line with the breakpoint is highlighted
Actual behaviour: A new file tab is opened, which is located somewhere in the Bazel execroot, e. g. /private/var/tmp/_bazel_foo/4cd9340ff2eef52aa6659fe37648ff08/execroot/simple-bazel/bazel-out/darwin-fastbuild/bin/libs/complex_calculations/test.runfiles/simple-bazel/libs/complex_calculations/tests/test.py. This is actually a symlink pointing to the original source file. The execution is suspended and the line that corresponds to the breakpoint is highlighted, but this happens in the wrong tab.
Which Intellij IDE are you using? Please provide the specific version.
Idea IC-243.23654.153, also reproducible in Clion
What programming languages and tools are you using? Please provide specific versions.
Python 3
What Bazel plugin version are you using?
Locally built, commit f1b2c7d94d6c58f715a10512f2bed4e80f9d35a1
Have you found anything relevant by searching the web?
This problem seems to be related to #319, #3097, #3823, #4151.
Any other information, logs, or outputs that you want to share?
No response
What needs to happen before this fix can be applied, I've been waiting for this to be fixed.
@odisseus are you interested in having this done?