Skip to content

Mixin breakpoints don't work when IDEA Android plugin is enabled #2019

@makamys

Description

@makamys

Minecraft Development for IntelliJ plugin version

2023.1-1.6.4

IntelliJ version

2023.1.1 (#IC-231.8770.65)

Operating System

Windows 10

Target platform

Mixins

Description of the bug

When IDEA's Android plugin is enabled, (which comes bundled with IDEA and is enabled by default,) breakpoints in mixins don't get hit. This is likely to be the underlying cause of #1999. Once the plugin is disabled, breakpoints work.

This is a regression. I have tested the following versions with the Android plugin enabled, placing a breakpoint in fabric-example-mod's example mixin:

IDEA version Minecraft Dev version Result
2021.1.3 (#IC-211.7628.21) 2021.1-1.5.19 ✅ Breakpoint gets hit
2022.3.2 (#IC-223.8617.56) 2022.3-1.6.4 ❌ Breakpoint is ignored
2023.1.1 (#IC-231.8770.65) 2023.1-1.6.4 ❌ Breakpoint is ignored

Code analysis

It seems the Android plugin's PositionManager is taking priority over the Mixin plugin's when the locationsOfLine call is dispatched from LineBreakpoint#createRequestForPreparedClass. MixinPositionManager#locationsOfLine thus never gets called.

(The first element of myPositionManagers shown in this screenshot is AndroidPositionManager, the second is MixinPositionManager.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions