@@ -25,7 +25,6 @@ import com.tang.intellij.lua.debugger.IRemoteConfiguration
2525import com.tang.intellij.lua.debugger.LuaDebugProcess
2626import com.tang.intellij.lua.debugger.LuaDebuggerEditorsProvider
2727import com.tang.intellij.lua.debugger.remote.commands.DebugCommand
28- import com.tang.intellij.lua.debugger.remote.commands.DefaultCommand
2928import com.tang.intellij.lua.debugger.remote.commands.GetStackCommand
3029import com.tang.intellij.lua.psi.LuaFileUtil
3130import java.io.IOException
@@ -80,12 +79,10 @@ open class LuaMobDebugProcess(session: XDebugSession) : LuaDebugProcess(session)
8079 private fun sendBreakpoint (client : MobClient , sourcePosition : XSourcePosition ) {
8180 val project = session.project
8281 val file = sourcePosition.file
83- val fileShortUrl: String? = LuaFileUtil .getShortUrl (project, file)
82+ val fileShortUrl: String? = LuaFileUtil .getShortPath (project, file)
8483 if (fileShortUrl != null ) {
85- client.sendAddBreakpoint(fileShortUrl, sourcePosition.line + 1 )
86- LuaFileUtil .getNoExtensionUrl(fileShortUrl).forEach{ url ->
84+ LuaFileUtil .getAllAvailablePathsForMob(fileShortUrl, file).forEach{ url ->
8785 client.sendAddBreakpoint(url, sourcePosition.line + 1 )
88- client.sendAddBreakpoint(url.replace(' /' , ' .' ), sourcePosition.line + 1 )
8986 }
9087 }
9188 }
@@ -99,11 +96,9 @@ open class LuaMobDebugProcess(session: XDebugSession) : LuaDebugProcess(session)
9996 super .unregisterBreakpoint(sourcePosition, position)
10097 if (mobClient != null ) {
10198 val file = sourcePosition.file
102- val fileShortUrl = LuaFileUtil .getShortUrl(session.project, file)
103- mobClient!! .sendRemoveBreakpoint(fileShortUrl, sourcePosition.line + 1 )
104- LuaFileUtil .getNoExtensionUrl(fileShortUrl).forEach{ url ->
99+ val fileShortUrl = LuaFileUtil .getShortPath(session.project, file)
100+ LuaFileUtil .getAllAvailablePathsForMob(fileShortUrl, file).forEach{ url ->
105101 mobClient!! .sendRemoveBreakpoint(url, sourcePosition.line + 1 )
106- mobClient!! .sendRemoveBreakpoint(url.replace(' /' , ' .' ), sourcePosition.line + 1 )
107102 }
108103 }
109104 }
0 commit comments