File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -193,10 +193,6 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
193193
194194 // Add the default launch options to the config.
195195 config . cwd = config . cwd || _ . get ( folder , "uri.fsPath" ) ;
196- // Auto add '--enable-preview' vmArgs if the java project enables COMPILER_PB_ENABLE_PREVIEW_FEATURES flag.
197- if ( await lsPlugin . detectPreviewFlag ( config . mainClass , config . projectName ) ) {
198- config . vmArgs = ( config . vmArgs || "" ) + " --enable-preview" ;
199- }
200196 } else if ( config . request === "attach" ) {
201197 if ( ! config . hostName || ! config . port ) {
202198 throw new utility . UserError ( {
@@ -221,6 +217,11 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
221217 config . vmArgs = this . concatArgs ( config . vmArgs ) ;
222218 }
223219
220+ // Auto add '--enable-preview' vmArgs if the java project enables COMPILER_PB_ENABLE_PREVIEW_FEATURES flag.
221+ if ( await lsPlugin . detectPreviewFlag ( config . mainClass , config . projectName ) ) {
222+ config . vmArgs = ( config . vmArgs || "" ) + " --enable-preview" ;
223+ }
224+
224225 if ( config . request === "launch" && ( ! config . shortenCommandLine || config . shortenCommandLine === "auto" ) ) {
225226 config . shortenCommandLine = await detectLaunchCommandStyle ( config ) ;
226227 }
You can’t perform that action at this time.
0 commit comments