Skip to content

Debugger crashes with Python 3 projectΒ #402

@PoncinMatthieu

Description

@PoncinMatthieu

Summary

We are unable to debug python3 bazel applications when the project sdk is setup to python 3, the debugger will crash with the following error before even executing the application:

Process finished with exit code 137 (interrupted by signal 9: SIGKILL)

If we don't switch the project sdk to python 3, import resolution by intellij will be done using the wrong libs and may be showing unexpected errors.

Steps to reproduce

Clone code example from rules_python repo: https://github.com/bazelbuild/rules_python

Create a venv with python 3, I used 3.6.5 and use the following .bazelproject file:

directories:
  examples/version

targets:
  //examples/version:version_test
  
workspace_type: python

build_flags:
  --python_path=/venv/python3.6.5/bin/python

Debugging will now work if the project sdk is python2, but if you change it to the venv, it will crash.
To change the project sdk, go to File -> Project Structure -> Project

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)lang: pythonPython rules integrationproduct: IntelliJIntelliJ pluginstaleIssues or PRs that are stale (no activity for 30 days)topic: debuggingIssues related to debuggingtype: bug

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions