Skip to content

Commit e2feb7e

Browse files
committed
get short path
1 parent 4700c07 commit e2feb7e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/tang/intellij/lua/debugger/remote/LuaRemoteDebugProcess.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ void addBreakpoint(XLineBreakpoint<XBreakpointProperties> breakpoint) {
131131
void removeBreakpoint(XLineBreakpoint<XBreakpointProperties> breakpoint) {
132132
XSourcePosition sourcePosition = breakpoint.getSourcePosition();
133133
if (sourcePosition != null) {
134-
String shortFilePath = breakpoint.getShortFilePath();
135-
mobServer.addCommand(String.format("DELB %s %d", shortFilePath, sourcePosition.getLine() + 1));
134+
String fileShortUrl = LuaFileUtil.getShortUrl(getSession().getProject(), sourcePosition.getFile());
135+
mobServer.addCommand(String.format("DELB %s %d", fileShortUrl, sourcePosition.getLine() + 1));
136136
}
137137
}
138138

src/main/java/com/tang/intellij/lua/psi/LuaFileUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public static VirtualFile[] getPackages(Project project, String shortUrl) {
9696

9797
public static String getShortUrl(Project project, VirtualFile file) {
9898
String fileFullUrl = file.getUrl();
99-
String fileShortUrl = null;
99+
String fileShortUrl = fileFullUrl;
100100

101101
Module[] modules = ModuleManager.getInstance(project).getModules();
102102
moduleLoop: for (Module module : modules) {

0 commit comments

Comments
 (0)