User: makamys Date: 08 May 23 13:58 Revision: b02d7c4800913e2eaa67039a6d5c5447c432ba32 Summary: Remap lines lazily in mixin targets that have not been decompiled yet (#2029) Fixes #2026 some more TeamCity URL: http://ci.mcdev.io:80/viewModification.html?tab=vcsModificationFiles&modId=8494&personal=false Index: src/main/kotlin/platform/mixin/debug/MixinPositionManager.kt =================================================================== --- src/main/kotlin/platform/mixin/debug/MixinPositionManager.kt (revision 484219ce0d8ee14ec2b9a1ec5e34d90205b3fe8b) +++ src/main/kotlin/platform/mixin/debug/MixinPositionManager.kt (revision b02d7c4800913e2eaa67039a6d5c5447c432ba32) @@ -29,6 +29,7 @@ import com.intellij.debugger.SourcePosition import com.intellij.debugger.engine.DebugProcess import com.intellij.debugger.engine.DebuggerUtils +import com.intellij.debugger.engine.PositionManagerImpl.ClsSourcePosition import com.intellij.debugger.impl.DebuggerUtilsEx import com.intellij.debugger.requests.ClassPrepareRequestor import com.intellij.ide.highlighter.JavaFileType @@ -82,6 +83,9 @@ val adjustedLine = DebuggerUtilsEx.bytecodeToSourceLine(psiFile, line) if (adjustedLine > -1) { line = adjustedLine + } else { + // Class is not decompiled yet, return a lazily remapped SourcePosition + return ClsSourcePosition(SourcePosition.createFromLine(psiFile, line), line) } }