Update session dropdown and fix running state info (#24019)

* Update session dropdown and fix running state info

* Update comment
This commit is contained in:
Sakshi Sharma
2023-07-31 10:02:16 -07:00
committed by GitHub
parent b08d33dcd7
commit 9043998bfd
2 changed files with 3 additions and 3 deletions

View File

@@ -553,7 +553,7 @@ export class ProfilerEditor extends EditorPane {
this._profilerService.launchCreateSessionDialog(this.input);
}
if (previousSessionName) { // skip updating session selector if there is no previous session name
if (!this.input.isFileSession) { // skip updating session selector for File session to block starting another session from a non-connected file session
this._updateSessionSelector(previousSessionName);
}
} else {
@@ -581,7 +581,7 @@ export class ProfilerEditor extends EditorPane {
}
if (this.input.state.isStopped) {
this._updateToolbar();
if (!this.input.isFileSession) { // skip updating session selector for File sessions
if (!this.input.isFileSession) { // skip updating session selector for File sessions to block starting another session from a non-connected file session
this._updateSessionSelector();
}
}

View File

@@ -161,7 +161,7 @@ export class ProfilerService implements IProfilerService {
this.updateMemento(id, { previousSessionName: sessionName });
try {
await this._runAction(id, provider => provider.startSession(this._idMap.get(id)!, sessionName, sessionType));
let isRunning = sessionType === ProfilingSessionType.RemoteSession ? true : false; // Reading session stops when the file reading completes
let isRunning = sessionType === ProfilingSessionType.LocalFile ? false : true; // Reading session stops when the file reading completes
this._sessionMap.get(this._idMap.reverseGet(id)!)!.onSessionStateChanged({ isRunning: isRunning, isStopped: false, isPaused: false });
return true;