File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed
Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -53,13 +53,13 @@ export class Debugger implements vscode.Disposable {
5353
5454 // get target arguments
5555 let args = [ ] ;
56- if ( targetName in config . debuggingTargetsArguments )
56+ if ( config . debuggingTargetsArguments && targetName in config . debuggingTargetsArguments )
5757 args = config . debuggingTargetsArguments [ targetName ] ;
58- else if ( "default" in config . debuggingTargetsArguments )
58+ else if ( config . debuggingTargetsArguments && "default" in config . debuggingTargetsArguments )
5959 args = config . debuggingTargetsArguments [ "default" ] ;
60- else if ( targetName in config . runningTargetsArguments )
60+ else if ( config . runningTargetsArguments && targetName in config . runningTargetsArguments )
6161 args = config . runningTargetsArguments [ targetName ] ;
62- else if ( "default" in config . runningTargetsArguments )
62+ else if ( config . runningTargetsArguments && "default" in config . runningTargetsArguments )
6363 args = config . runningTargetsArguments [ "default" ] ;
6464
6565 // uses codelldb debugger?
Original file line number Diff line number Diff line change @@ -211,13 +211,13 @@ class XmakeConfigurationProvider implements vscode.DebugConfigurationProvider {
211211 if ( ! config . args ) {
212212 let args = [ ] ;
213213
214- if ( config . target in config . debuggingTargetsArguments )
214+ if ( config . debuggingTargetsArguments && config . target in config . debuggingTargetsArguments )
215215 args = config . debuggingTargetsArguments [ config . target ] ;
216- else if ( "default" in config . debuggingTargetsArguments )
216+ else if ( config . debuggingTargetsArguments && "default" in config . debuggingTargetsArguments )
217217 args = config . debuggingTargetsArguments [ "default" ] ;
218- else if ( config . target in config . runningTargetsArguments )
218+ else if ( config . runningTargetsArguments && config . target in config . runningTargetsArguments )
219219 args = config . runningTargetsArguments [ config . target ] ;
220- else if ( "default" in config . runningTargetsArguments )
220+ else if ( config . runningTargetsArguments && "default" in config . runningTargetsArguments )
221221 args = config . runningTargetsArguments [ "default" ] ;
222222
223223 config . args = args ;
Original file line number Diff line number Diff line change @@ -901,9 +901,9 @@ export class XMake implements vscode.Disposable {
901901 // get target arguments
902902 let args = [ "run" ] ;
903903 let configArgs = [ ] ;
904- if ( targetName && targetName in config . runningTargetsArguments )
904+ if ( targetName && config . runningTargetsArguments && targetName in config . runningTargetsArguments )
905905 configArgs = config . runningTargetsArguments [ targetName ] ;
906- else if ( "default" in config . runningTargetsArguments )
906+ else if ( config . runningTargetsArguments && "default" in config . runningTargetsArguments )
907907 configArgs = config . runningTargetsArguments [ "default" ] ;
908908
909909 // make command
@@ -949,9 +949,9 @@ export class XMake implements vscode.Disposable {
949949 // get target arguments
950950 let args = [ "run" ] ;
951951 let configArgs = [ ] ;
952- if ( targetName && targetName in config . runningTargetsArguments )
952+ if ( targetName && config . runningTargetsArguments && targetName in config . runningTargetsArguments )
953953 configArgs = config . runningTargetsArguments [ targetName ] ;
954- else if ( "default" in config . runningTargetsArguments )
954+ else if ( config . runningTargetsArguments && "default" in config . runningTargetsArguments )
955955 configArgs = config . runningTargetsArguments [ "default" ] ;
956956
957957 // make command
You can’t perform that action at this time.
0 commit comments