File tree Expand file tree Collapse file tree
src/main/fish/payara/server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ export class PayaraServerInstanceController extends PayaraInstanceController {
108108 this . refreshServerList ( ) ;
109109 } ) ;
110110 } else if ( payaraServer instanceof PayaraRemoteServerInstance ) {
111- if ( state . instanceType == "docker" ) {
111+ if ( state . instanceType == "docker" ) {
112112 payaraServer . setHostPath ( state . hostPath . trim ( ) ) ;
113113 payaraServer . setContainerPath ( state . containerPath . trim ( ) ) ;
114114 }
@@ -863,10 +863,13 @@ export class PayaraServerInstanceController extends PayaraInstanceController {
863863
864864 public readDebugPortFromWorkspace ( uri : Uri ) {
865865 const workspaceFolder = vscode . workspace . getWorkspaceFolder ( uri ) ;
866- const launchConfig = vscode . workspace . getConfiguration ( 'launch' , workspaceFolder . uri ) ;
867- const debugConfigurations = launchConfig . get ( 'configurations' ) as any [ ] ;
868- const debugConfig = debugConfigurations . find ( config => config . type === 'java' && config . request === 'attach' ) ;
869- return debugConfig && debugConfig . port ;
866+ if ( workspaceFolder ) {
867+ const launchConfig = vscode . workspace . getConfiguration ( 'launch' , workspaceFolder . uri ) ;
868+ const debugConfigurations = launchConfig . get ( 'configurations' ) as any [ ] ;
869+ const debugConfig = debugConfigurations . find ( config => config . type === 'java' && config . request === 'attach' ) ;
870+ return debugConfig && debugConfig . port ;
871+ }
872+ return undefined ;
870873 }
871874
872875 private selectListedServer ( callback : ( server : PayaraServerInstance ) => any ) {
You can’t perform that action at this time.
0 commit comments