Skip to content

Commit 72ed1a8

Browse files
author
Benjamin Pasero
committed
1 parent b3665b9 commit 72ed1a8

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

  • src/vs/code/electron-main

src/vs/code/electron-main/app.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ import { hasArgs } from 'vs/platform/environment/node/argv';
6868
import { RunOnceScheduler } from 'vs/base/common/async';
6969
import { registerContextMenuListener } from 'vs/base/parts/contextmenu/electron-main/contextmenu';
7070
import { THEME_STORAGE_KEY, THEME_BG_STORAGE_KEY } from 'vs/code/electron-main/theme';
71-
import { nativeSep } from 'vs/base/common/paths';
71+
import { nativeSep, join } from 'vs/base/common/paths';
72+
import { homedir } from 'os';
73+
import { localize } from 'vs/nls';
7274

7375
export class CodeApplication {
7476

@@ -379,11 +381,16 @@ export class CodeApplication {
379381

380382
recordingStopped = true; // only once
381383

382-
contentTracing.stopRecording('', path => {
383-
if (timeout) {
384-
this.logService.info(`Tracing: data recorded (after 30s timeout) to ${path}`);
384+
contentTracing.stopRecording(join(homedir(), `${product.applicationName}-${Math.random().toString(16).slice(-4)}.trace`), path => {
385+
if (!timeout) {
386+
this.windowsMainService.showMessageBox({
387+
type: 'info',
388+
message: localize('trace.message', "Successfully created trace."),
389+
detail: localize('trace.detail', "Please create an issue and manually attach the following file:\n{0}", path),
390+
buttons: [localize('trace.ok', "Ok")]
391+
}, this.windowsMainService.getLastActiveWindow());
385392
} else {
386-
this.logService.info(`Tracing: data recorded to ${path}`);
393+
this.logService.info(`Tracing: data recorded (after 30s timeout) to ${path}`);
387394
}
388395
});
389396
};

0 commit comments

Comments
 (0)