Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve debugger install error messages #109

Merged
merged 1 commit into from
Mar 18, 2016
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"run-in-terminal": "*",
"semver": "*",
"vscode-extension-telemetry": "0.0.4",
"tmp": "0.0.28"
"tmp": "0.0.28",
"open": "*"
},
"devDependencies": {
"gulp": "^3.9.1",
Expand Down
25 changes: 18 additions & 7 deletions src/coreclr-debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@ export function installCoreClrDebug(context: vscode.ExtensionContext) {
}

if (!isOnPath('dotnet')) {
// TODO: In a future release, this should be an error. For this release, we will let it go
console.log("The .NET CLI tools are not installed. .NET Core debugging will not be enabled.");
const getDotNetMessage = "Get .NET CLI tools";
vscode.window.showErrorMessage("The .NET CLI tools cannot be located. .NET Core debugging will not be enabled. Make sure .NET CLI tools are installed and are on the path.",
getDotNetMessage).then(function (value) {
if (value === getDotNetMessage) {
var open = require('open');
open("http://dotnet.github.io/getting-started/");
}
});

return;
}

Expand All @@ -45,9 +52,8 @@ export function installCoreClrDebug(context: vscode.ExtensionContext) {
};
})();

_channel.appendLine("Downloading and configuring the .NET Core Debugger...");
_channel.show(vscode.ViewColumn.Three);

vscode.window.setStatusBarMessage("Downloading and configuring the .NET Core Debugger...");

let installStage = 'dotnet restore';
let installError = '';

Expand All @@ -71,10 +77,15 @@ export function installCoreClrDebug(context: vscode.ExtensionContext) {
return writeCompletionFile();
}).then(function() {
installStage = "completeSuccess";
_channel.appendLine('Succesfully installed .NET Core Debugger.');
vscode.window.setStatusBarMessage('Successfully installed .NET Core Debugger.');
})
.catch(function(error) {
_channel.appendLine('Error while installing .NET Core Debugger.');
const viewLogMessage = "View Log";
vscode.window.showErrorMessage('Error while installing .NET Core Debugger.', viewLogMessage).then(function (value) {
if (value === viewLogMessage) {
_channel.show(vscode.ViewColumn.Three);
}
})

installError = error.toString();
console.log(error);
Expand Down