File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,11 @@ class BashConfigurationProvider implements vscode.DebugConfigurationProvider {
53
53
if ( ! config . type || ! config . name ) {
54
54
let msg = "BUG in Bash Debug: reached to unreachable code." ;
55
55
msg += "\nIf it is reproducible, please report this bug on: https://github.com/rogalmic/vscode-bash-debug/issues" ;
56
- msg += "\nYou can avoid this bug by setting \" type\" and \" name\" attributes in launch.json." ;
56
+ msg += "\nYou can avoid this bug by setting ` type` and ` name` attributes in launch.json." ;
57
57
return vscode . window . showErrorMessage ( msg ) . then ( _ => { return undefined ; } ) ;
58
58
}
59
59
if ( ! config . request ) {
60
- let msg = "Please set \" request\" attribute to \" launch\" ." ;
60
+ let msg = "Please set ` request` attribute to ` launch` ." ;
61
61
return vscode . window . showErrorMessage ( msg ) . then ( _ => { return undefined ; } ) ;
62
62
}
63
63
@@ -77,11 +77,17 @@ class BashConfigurationProvider implements vscode.DebugConfigurationProvider {
77
77
78
78
// Check "required" attributes (defined in package.json) are included
79
79
if ( ! config . program ) {
80
- return vscode . window . showErrorMessage ( "Please specify \" program\" in launch.json." ) . then ( _ => { return undefined ; } ) ;
80
+ return vscode . window . showErrorMessage ( "Please specify ` program` in launch.json." ) . then ( _ => { return undefined ; } ) ;
81
81
}
82
82
83
83
// Fill non-"required" attributes with default values to prevent bashdb (or other programs) from panic
84
- if ( ! config . args ) { config . args = [ ] ; }
84
+ if ( ! config . args ) {
85
+ config . args = [ ] ;
86
+ }
87
+ else if ( ! Array . isArray ( config . args ) ) {
88
+ return vscode . window . showErrorMessage ( "Please specify `args` as array of strings in launch.json." ) . then ( _ => { return undefined ; } ) ;
89
+ }
90
+
85
91
if ( ! config . env ) { config . env = { } ; }
86
92
if ( ! config . cwd ) {
87
93
if ( ! folder ) {
You can’t perform that action at this time.
0 commit comments