diff --git a/src/CommunityToolkit.Aspire.Hosting.Java/JavaAppHostingExtension.Executable.cs b/src/CommunityToolkit.Aspire.Hosting.Java/JavaAppHostingExtension.Executable.cs index 2d53270f..fb8aa9aa 100644 --- a/src/CommunityToolkit.Aspire.Hosting.Java/JavaAppHostingExtension.Executable.cs +++ b/src/CommunityToolkit.Aspire.Hosting.Java/JavaAppHostingExtension.Executable.cs @@ -217,7 +217,10 @@ await notificationService.PublishUpdateAsync(javaAppResource, state => state wit private static IResourceBuilder WithJavaDefaults( this IResourceBuilder builder, JavaAppExecutableResourceOptions options) => +#pragma warning disable ASPIREEXTENSION001 // Type is for evaluation purposes only and is subject to change or removal in future updates builder.WithOtlpExporter() .WithEnvironment("JAVA_TOOL_OPTIONS", $"-javaagent:{options.OtelAgentPath?.TrimEnd('/')}/opentelemetry-javaagent.jar") - .WithEnvironment("SERVER_PORT", options.Port.ToString(CultureInfo.InvariantCulture)); + .WithEnvironment("SERVER_PORT", options.Port.ToString(CultureInfo.InvariantCulture)) + .WithVSCodeDebugSupport(builder.Resource.WorkingDirectory, "java", "vscjava.vscode-java-pack"); +#pragma warning restore ASPIREEXTENSION001 // Type is for evaluation purposes only and is subject to change or removal in future updates }