Skip to content

Python; issue with debugger functionality on 2025.2 #7846

@andponlin-canva

Description

@andponlin-canva

Description of the bug:

I am unable to debug Python Bazel targets with the 2025.2 IDE version with the 2025.08.4-api-version-252 version of the Intelli/Bazel plugin. This does work with 2025.1 IDE version and associated plugin.

Which category does this issue belong to?

Intellij

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

Steps to reproduce

  • Install Intelli-J 2025.2 + Python plugin + Intelli-J / Bazel plugin
  • Setup a Python SDK
  • Open the project examples/python/simple_code_generator
  • Right click on the Bazel target //example:bin and choose "Debug..."

Expected

It was expected that a debug session would start with the IDE.

Actual

An error message appears;

Image

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

Build #IU-252.23892.409, built on August 1, 2025

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

Python

What Bazel plugin version are you using?

2025.08.4-api-version-252

Have you found anything relevant by searching the web?

No response

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

The top of the log trace is;

java.lang.ClassCastException: class com.google.idea.blaze.python.run.BlazePyRunConfigurationRunner$BlazePyDummyRunProfileState cannot be cast to class com.jetbrains.python.run.PythonCommandLineState (com.google.idea.blaze.python.run.BlazePyRunConfigurationRunner$BlazePyDummyRunProfileState is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @266e66cf; com.jetbrains.python.run.PythonCommandLineState is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @7bfeab9a)
	at com.jetbrains.python.debugger.PyDebugRunner.createSessionUsingTargetsApi(PyDebugRunner.java:157)
	at com.jetbrains.python.debugger.PyDebugRunner.createSession(PyDebugRunner.java:152)
	at com.jetbrains.python.debugger.PyDebugRunner.execute(PyDebugRunner.java:384)
	at com.jetbrains.python.debugger.PyDebugRunner.executeWithLegacyWorkaround(PyDebugRunner.java:415)
	at com.jetbrains.python.debugger.PyDebugRunner.lambda$exec$15(PyDebugRunner.java:1155)
	at com.intellij.execution.impl.ExecutionManagerImpl.startRunProfile$lambda$6(ExecutionManagerImpl.kt:229)
	at com.intellij.execution.impl.ExecutionManagerImpl.doStartRunProfile$lambda$15(ExecutionManagerImpl.kt:296)
...

Possibly it should be running BlazePyDebugRunner instead?

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions