aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/package.json2
-rw-r--r--editors/code/src/main.ts12
-rw-r--r--editors/code/src/util.ts1
3 files changed, 9 insertions, 6 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index e6ceb235f..68484a370 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -426,7 +426,7 @@
426 "Full log" 426 "Full log"
427 ], 427 ],
428 "default": "off", 428 "default": "off",
429 "description": "Trace requests to the rust-analyzer" 429 "description": "Trace requests to the rust-analyzer (this is usually overly verbose and not recommended for regular users)"
430 }, 430 },
431 "rust-analyzer.trace.extension": { 431 "rust-analyzer.trace.extension": {
432 "description": "Enable logging of VS Code extensions itself", 432 "description": "Enable logging of VS Code extensions itself",
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index 7bae8bb33..12b4d0510 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -43,12 +43,16 @@ export async function activate(context: vscode.ExtensionContext) {
43 const config = new Config(context); 43 const config = new Config(context);
44 const state = new PersistentState(context.globalState); 44 const state = new PersistentState(context.globalState);
45 const serverPath = await bootstrap(config, state).catch(err => { 45 const serverPath = await bootstrap(config, state).catch(err => {
46 let message = "Failed to bootstrap rust-analyzer."; 46 let message = "bootstrap error. ";
47
47 if (err.code === "EBUSY" || err.code === "ETXTBSY") { 48 if (err.code === "EBUSY" || err.code === "ETXTBSY") {
48 message += " Other vscode windows might be using rust-analyzer, " + 49 message += "Other vscode windows might be using rust-analyzer, ";
49 "you should close them and reload this window to retry."; 50 message += "you should close them and reload this window to retry. ";
50 } 51 }
51 message += " Open \"Help > Toggle Developer Tools > Console\" to see the logs"; 52
53 message += 'Open "Help > Toggle Developer Tools > Console" to see the logs ';
54 message += '(enable verbose logs with "rust-analyzer.trace.extension")';
55
52 log.error("Bootstrap error", err); 56 log.error("Bootstrap error", err);
53 throw new Error(message); 57 throw new Error(message);
54 }); 58 });
diff --git a/editors/code/src/util.ts b/editors/code/src/util.ts
index fe3fb71cd..fec4c3295 100644
--- a/editors/code/src/util.ts
+++ b/editors/code/src/util.ts
@@ -26,7 +26,6 @@ export const log = new class {
26 } 26 }
27 27
28 error(message?: any, ...optionalParams: any[]): void { 28 error(message?: any, ...optionalParams: any[]): void {
29 if (!log.enabled) return;
30 debugger; 29 debugger;
31 // eslint-disable-next-line no-console 30 // eslint-disable-next-line no-console
32 console.error(message, ...optionalParams); 31 console.error(message, ...optionalParams);