@@ -404,32 +404,26 @@ class MatlabProcess {
404
404
command = matlabPath . includes ( ' ' ) ? `"${ matlabPath } "` : matlabPath
405
405
}
406
406
407
- const args : string [ ] = [ ]
408
-
409
- const argsFromSettings = ConfigurationManager . getArgument ( Argument . MatlabLaunchCommandArguments ) ?? null
410
- if ( argsFromSettings != null ) {
411
- args . push ( argsFromSettings )
412
- }
413
-
414
- args . push ( '-nosplash' )
407
+ const args = [
408
+ '-nosplash' ,
409
+ '-useStartupFolderPref' , // Startup folder flag
410
+ '-memmgr' , 'release' , // Memory manager
411
+ '-logFile' , path . join ( Logger . logDir , 'matlabls.log' ) , // Log file
412
+ '-r' , `"addpath(fullfile('${ __dirname } ', '..', 'matlab')); initmatlabls('${ outFile } ')"` // Startup command
413
+ ]
415
414
416
415
if ( os . platform ( ) === 'win32' ) {
417
416
args . push ( '-wait' )
418
- }
419
-
420
- args . push ( '-useStartupFolderPref' ) // Startup folder flag
421
- args . push ( '-memmgr' , 'release' ) // Memory manager
422
- args . push ( '-logfile' , path . join ( Logger . logDir , 'matlabls.log' ) ) // Log file
423
- args . push ( '-r' , `"addpath(fullfile('${ __dirname } ', '..', 'matlab')); initmatlabls('${ outFile } ')"` ) // Startup command
424
-
425
- // Desktop mode
426
- if ( os . platform ( ) === 'win32' ) {
427
- // Workaround for Windows until a better solution is implemented
428
- args . push ( '-noDisplayDesktop' )
417
+ args . push ( '-noDisplayDesktop' ) // Workaround for '-nodesktop' on Windows until a better solution is implemented
429
418
} else {
430
419
args . push ( '-nodesktop' )
431
420
}
432
421
422
+ const argsFromSettings = ConfigurationManager . getArgument ( Argument . MatlabLaunchCommandArguments ) ?? null
423
+ if ( argsFromSettings != null ) {
424
+ args . push ( argsFromSettings )
425
+ }
426
+
433
427
return {
434
428
command,
435
429
args
0 commit comments