File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,14 @@ async function pickDevice(): Promise<void> {
146146 toastStatusBarMessage ( `Connected` ) ;
147147 }
148148 catch ( err ) {
149- vscode . window . showErrorMessage ( `Failed to connect to ${ device . name } : ${ err . message } ` ) ;
149+ const troubleshoot = 'Troubleshoot' ;
150+ vscode . window . showErrorMessage ( `Failed to connect to ${ device . name } : ${ err . message } ` , troubleshoot )
151+ . then ( ( value ) => {
152+ if ( value === troubleshoot ) {
153+ const wiki = vscode . Uri . parse ( 'https://github.com/ev3dev/vscode-ev3dev-browser/wiki/Troubleshooting' )
154+ vscode . commands . executeCommand ( 'vscode.open' , wiki ) ;
155+ }
156+ } ) ;
150157 }
151158 } ) ;
152159}
@@ -783,7 +790,14 @@ class DeviceTreeItem extends vscode.TreeItem {
783790 toastStatusBarMessage ( `Connected to ${ this . label } ` ) ;
784791 }
785792 catch ( err ) {
786- vscode . window . showErrorMessage ( `Failed to connect to ${ this . label } : ${ err . message } ` ) ;
793+ const troubleshoot = 'Troubleshoot' ;
794+ vscode . window . showErrorMessage ( `Failed to connect to ${ this . label } : ${ err . message } ` , troubleshoot )
795+ . then ( ( value ) => {
796+ if ( value === troubleshoot ) {
797+ const wiki = vscode . Uri . parse ( 'https://github.com/ev3dev/vscode-ev3dev-browser/wiki/Troubleshooting' )
798+ vscode . commands . executeCommand ( 'vscode.open' , wiki ) ;
799+ }
800+ } ) ;
787801 }
788802 }
789803
You can’t perform that action at this time.
0 commit comments