Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lldb/tools/lldb-dap/src-ts/lldb-dap-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,12 @@ Restarting the server will interrupt any existing debug sessions and start a new
return [
path,
...args,
...Object.entries(env ?? {}).map(
(entry) => String(entry[0]) + "=" + String(entry[1]),
),
...Object.entries(env ?? {})
// Filter and sort to avoid restarting the server just because the
// order of env changed or the log path changed.
.filter((entry) => String(entry[0]) !== "LLDBDAP_LOG")
.sort()
.map((entry) => String(entry[0]) + "=" + String(entry[1])),
];
}
}
3 changes: 2 additions & 1 deletion lldb/tools/lldb-dap/src-ts/logging.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as os from 'os';
import * as path from "path";
import * as vscode from "vscode";

Expand Down Expand Up @@ -44,7 +45,7 @@ export class LogFilePathProvider {
const logFolder = this.logFolder || this.context.logUri.fsPath;
switch(type) {
case LogType.DEBUG_SESSION:
return path.join(logFolder, `lldb-dap-session-${formatDate(new Date())}.log`);
return path.join(logFolder, `lldb-dap-session-${os.userInfo().username}-${formatDate(new Date())}.log`);
break;
}
}
Expand Down
Loading