From ad3a37874d6a7891343edd654cf9d5a8f8b88471 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Wed, 8 Jul 2026 15:08:50 -0300 Subject: [PATCH 1/2] Adding launch ref, updating topics --- modules/ROOT/nav.adoc | 1 + .../ROOT/pages/int-create-secure-configs.adoc | 3 + .../ROOT/pages/int-migrate-studio-to-acb.adoc | 25 +- .../int-run-mule-apps-with-properties.adoc | 271 +++++++++++++++++ .../pages/int-run-multiple-mule-apps.adoc | 111 +++++++ .../pages/ref-launch-json-properties.adoc | 284 ++++++++++++++++++ 6 files changed, 694 insertions(+), 1 deletion(-) create mode 100644 modules/ROOT/pages/int-run-mule-apps-with-properties.adoc create mode 100644 modules/ROOT/pages/int-run-multiple-mule-apps.adoc create mode 100644 modules/ROOT/pages/ref-launch-json-properties.adoc diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 7829df9b5..2cffcca0f 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -111,6 +111,7 @@ ** xref:ref-connectors.adoc[Connectors] ** xref:ref-components.adoc[] ** xref:ref-deployment.adoc[Deployment Properties] +** xref:ref-launch-json-properties.adoc[launch.json Configuration Properties] ** xref:ref-acb-commands.adoc[MuleSoft Commands] ** xref:ref-mule-settings.adoc[MuleSoft Settings] ** xref:ref-proxy-settings.adoc[Proxy Settings] diff --git a/modules/ROOT/pages/int-create-secure-configs.adoc b/modules/ROOT/pages/int-create-secure-configs.adoc index 290d5b723..f783195b2 100644 --- a/modules/ROOT/pages/int-create-secure-configs.adoc +++ b/modules/ROOT/pages/int-create-secure-configs.adoc @@ -671,4 +671,7 @@ You can create properties or change the value of existing properties, for exampl == See Also +* xref:int-global-config-elements.adoc[] +* xref:int-run-mule-apps-with-properties.adoc[] +* xref:ref-launch-json-properties.adoc[] * xref:mule-runtime::secure-configuration-properties.adoc[] diff --git a/modules/ROOT/pages/int-migrate-studio-to-acb.adoc b/modules/ROOT/pages/int-migrate-studio-to-acb.adoc index 2a40f0cf1..e55e91cdd 100644 --- a/modules/ROOT/pages/int-migrate-studio-to-acb.adoc +++ b/modules/ROOT/pages/int-migrate-studio-to-acb.adoc @@ -1,11 +1,34 @@ = Migrating Mule Projects from Anypoint Studio to Anypoint Code Builder :page-deployment-options: cloud-ide, desktop-ide -Migrate your Mule project from Anypoint Studio to Anypoint Code Builder by creating a deployable Mule application archive (JAR file). +Migrate your Mule project from Anypoint Studio to Anypoint Code Builder by creating a deployable Mule application archive (JAR file). With Anypoint Code Builder, you unlock a modern development experience with advantages like faster startup times, streamlined collaboration, and the integration of MuleSoft for Agentforce: Topic Center to enable API specifications for topics and agents. include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] +== Set Run and Debug Configurations + +In Anypoint Studio, you configure run and debug settings through the UI with tabs for arguments, environment, and other settings. In Anypoint Code Builder, you manage these configurations by editing the `launch.json` file in your project's `.vscode` folder. + +[%header,cols="40a,60a"] +|=== +| Studio UI | Anypoint Code Builder + +| *Run Configurations* > *Arguments* tab > *VM arguments* +| `mule.runtime.args` property in launch.json + +| *Run Configurations* > *Environment* tab +| Environment variables passed via `mule.runtime.args` (e.g., `-M-Denv=dev`) + +| *Run Configurations* > *Port* settings (if available) +| `mule.debug.port` property in launch.json + +| Configuration dropdown in toolbar +| Configuration dropdown in *Run and Debug* view +|=== + +For a reference of `launch.json` properties, see xref:ref-launch-json-properties.adoc[]. + == Export Your Mule Project to a Sharable JAR File in Anypoint Studio include::partial$acb-project-migration.adoc[tag="export-mule-projects-from-studio"] diff --git a/modules/ROOT/pages/int-run-mule-apps-with-properties.adoc b/modules/ROOT/pages/int-run-mule-apps-with-properties.adoc new file mode 100644 index 000000000..e93508473 --- /dev/null +++ b/modules/ROOT/pages/int-run-mule-apps-with-properties.adoc @@ -0,0 +1,271 @@ += Pass Runtime Properties and Arguments to Mule Applications +:page-deployment-options: desktop-ide + +include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] + +Configure runtime behavior, secure sensitive data, and test different environments by passing properties and arguments to Mule applications running locally in Anypoint Code Builder. + +Use command-line properties to switch between development, sandbox, and production configurations, provide encryption keys for secure properties, and override default values without modifying application code. + +You can pass properties when running Mule applications locally through different methods. + +* <>: Apply the same arguments to all Mule applications +* <>: Configure arguments for individual projects or create multiple configurations with different settings + +For a reference of `launch.json` configuration properties, see xref:ref-launch-json-properties.adoc[]. + +[[mule-settings-method]] +== Configure Global Default Arguments + +Configure arguments that apply to all Mule application runs in Anypoint Code Builder. Use this approach when you consistently need the same encryption key or environment setting across all projects during local development. + +To configure global default arguments: + +. Open Mule settings: ++ +include::partial$acb-reusable-steps.adoc[tags="open-mule-settings"] + +. Find the *Mule › Runtime: Default Arguments* setting. + +. In the *Runtime: Default Arguments* field, append your arguments using the `-M-D` prefix followed by the property name and value: ++ +[source,text] +---- +-M-Dencryption.key=myEncryptionKey123 +---- ++ +To add multiple arguments, separate them with spaces: ++ +[source,text] +---- +-M-Dencryption.key=myEncryptionKey123 -M-Denv=dev -M-Dhttp.port=8082 +---- + +. Run or debug your Mule application: ++ +include::partial$acb-reusable-steps.adoc[tags="open-command-palette"] ++ +Select *View: Show Run and Debug*, then click *Run and Debug*. ++ +Mule Runtime engine receives the configured arguments each time you run any application. + +=== Understand Property Syntax + +The `-M-D` prefix passes system properties to the Java Virtual Machine (JVM) that runs Mule Runtime engine. These properties become available throughout your Mule application and can be referenced in configuration XML files. + +When configuring properties in the *Runtime: Default Arguments* field: + +* Use the `-M-D` prefix followed by the property name and value: `-M-Dname=value` +* Separate multiple properties with spaces +* Avoid quotes around values unless the value contains spaces +* Property names are case-sensitive + +.Common examples: +[source,text] +---- +-M-Dencryption.key=mySecretKey +-M-Denv=dev +-M-Dhttp.port=8081 +-M-Ddatabase.host=localhost +-M-Dmule.env=development +---- + +[[launch-json-method]] +== Configure Project-Specific Launch Configurations + +Configure arguments for individual projects or create multiple run configurations with different settings for the same project. Use this approach when different projects require different configurations, or to test the same project with different property values. + +Launch configurations reside in the `.vscode/launch.json` file in your project directory and apply only to that project. + +=== Create or Modify a Launch Configuration + +To configure project-specific arguments: + +include::partial$acb-reusable-steps.adoc[tags="open-command-palette"] + +. Enter and select *Open 'launch.json'*. ++ +If the file doesn't exist, VS Code creates it in the `.vscode` folder of your project. + +. In the `launch.json` file, locate or create a configuration object within the `configurations` array. + +. Add or modify the `mule.runtime.args` property to include your arguments: ++ +[source,json] +---- +{ + "version": "0.2.0", + "configurations": [ + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Debug Mule Application", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Dencryption.key=myKey -M-Denv=dev" + } + ] +} +---- + +. Save the `launch.json` file. + +. Run or debug your application by selecting the configuration from the *Run and Debug* view. + +=== Test the Same Project with Different Property Values + +Create multiple launch configurations with different property values to test various environments without editing the configuration file each time. For conceptual information about creating and managing launch configurations, see xref:int-run-multiple-mule-apps.adoc[]. + +The key difference when configuring properties is to vary the `mule.runtime.args` values for each configuration: + +[source,json] +---- +{ + "version": "0.2.0", + "configurations": [ + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Debug - Development", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Denv=dev -M-Dhttp.port=8081" + }, + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Debug - Sandbox", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Denv=sandbox -M-Dhttp.port=8082" + } + ] +} +---- + +Switch between configurations using the dropdown in the *Run and Debug* view. + +=== Use Environment Variables in Launch Configurations + +Reference environment variables defined on your system to avoid hardcoding sensitive values in `launch.json`: + +[source,json] +---- +{ + "version": "0.2.0", + "configurations": [ + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Debug with Environment Variables", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Dencryption.key=${env:ENCRYPTION_KEY} -M-Denv=${env:MULE_ENV}" + } + ] +} +---- + +Reference environment variables using the `${env:VARIABLE_NAME}` syntax. The example configuration references `ENCRYPTION_KEY` and `MULE_ENV` from your system environment. + +[[common-use-cases]] +== Common Use Cases and Examples + +These examples demonstrate common scenarios for passing runtime properties and arguments, such as configuring HTTP listener ports and database connection parameters. + +For examples of passing encryption keys and switching between environment-specific property files, see xref:int-create-secure-configs.adoc[]. + +=== Example: Set HTTP Listener Port Dynamically + +Set the HTTP listener port at runtime without modifying your configuration XML: + +.Global default arguments: +[source,text] +---- +-M-Dhttp.port=8082 +---- + +.Launch configuration: +[source,json] +---- +{ + "version": "0.2.0", + "configurations": [ + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Debug on Port 8082", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Dhttp.port=8082" + } + ] +} +---- + +Reference the property in your HTTP listener configuration: + +[source,xml] +---- + + + +---- + +=== Example: Provide Database Connection Parameters + +Provide database connection parameters at runtime to switch between local and remote databases: + +.Global default arguments: +[source,text] +---- +-M-Ddb.host=localhost -M-Ddb.port=3306 -M-Ddb.name=mydb +---- + +.Launch configurations for different databases: +[source,json] +---- +{ + "version": "0.2.0", + "configurations": [ + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Debug with Local Database", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Ddb.host=localhost -M-Ddb.port=3306 -M-Ddb.name=mydb" + }, + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Debug with Remote Database", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Ddb.host=remote-db.example.com -M-Ddb.port=3306 -M-Ddb.name=proddb" + } + ] +} +---- + +Reference these properties in your database configuration: + +[source,xml] +---- + + + +---- + +== See Also + +* xref:int-create-secure-configs.adoc[] +* xref:int-run-multiple-mule-apps.adoc[] +* xref:ref-mule-settings.adoc#setting-mule-args[] +* xref:int-global-config-elements.adoc[] +* xref:mule-runtime::configuring-properties.adoc[] diff --git a/modules/ROOT/pages/int-run-multiple-mule-apps.adoc b/modules/ROOT/pages/int-run-multiple-mule-apps.adoc new file mode 100644 index 000000000..6ee44099b --- /dev/null +++ b/modules/ROOT/pages/int-run-multiple-mule-apps.adoc @@ -0,0 +1,111 @@ += Running Multiple Mule Applications Concurrently +:page-deployment-options: desktop-ide + +include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] + +Run multiple Mule applications concurrently in the same local runtime instance by creating a custom run or debug configuration in your workspace. +Use this approach to test service-to-service interaction and verify end-to-end integration behavior without deploying to remote environments. + +To run related projects together, configure a workspace-level launch configuration that includes all target projects. After you create the configuration, you can reuse it for both run and debug sessions. + +To create run configurations for multiple projects using MuleSoft Vibes, see xref:vibes-run-multiple-integration-projects-locally.adoc[]. + +== Before You Begin + +* xref:start-workspaces.adoc[Create a multi-root workspace] that contains all the Mule projects you want to run concurrently. +* Open the configuration XML files for each project to verify there are no port conflicts between the projects. ++ +For example, if two projects both use port `8081` for an HTTP Listener, change one project to use a different port such as `8082`. + +[[create-run-config]] +== Create a Run Configuration for Multiple Projects + +To create a workspace-level run configuration: + +. Open the configuration XML files for the projects you want to run. ++ +This step ensures the projects are loaded and available in the workspace. +// Pointer to Run and Debug +include::partial$acb-reusable-steps.adoc[tags="open-run-debug"] +. In the *Run and Debug* panel, open the launch configuration dropdown and select *Add Config (workspace)*. ++ +If you don't see this option, ensure all projects are in the same workspace and the workspace is open. +. Select *Mule XML Debugger* from the list of available debuggers. ++ +Anypoint Code Builder creates a new launch configuration entry in your `.code-workspace` file and opens it for editing. +. In the configuration editor, update the `name` field for the *Run* configuration to describe the set of projects you are running. +. Update the `mule.projects` field to include all project folders you want to run concurrently. ++ +Use this format `"${workspaceFolder:project1FolderName}", "${workspaceFolder:project2FolderName}"` ++ +Replace `project1FolderName` and `project2FolderName` with the actual folder names of your projects. Add additional project folders separated by commas as needed. ++ +. Copy the `mule.projects` values and paste them into the `mule.projects` field inside the *Debug* configuration. ++ +This step ensures the same projects are available when you run in debug mode. ++ +Example configuration: ++ +[source,json] +---- +"version": "0.2.0", + "configurations": [ + + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Run Multiple Applications", + "noDebug": true, + "mule.projects": [ + "${workspaceFolder:first-project}", + "${workspaceFolder:second-project}" + ], + "mule.runtime.args": "${config:mule.runtime.defaultArguments}" + }, + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Debug Multiple Applications", + "mule.projects": [ + "${workspaceFolder:first-project}", + "${workspaceFolder:second-project}" + ], + "mule.runtime.args": "${config:mule.runtime.defaultArguments}" + } + ] +---- +. Save the `.code-workspace` file. ++ +The new configuration now appears in the launch configuration dropdown in the *Run and Debug* panel. + +[[run-config]] +== Run the Configuration + +After you create the configuration, run it to start all included projects in the same local runtime instance: + +// Pointer to Run and Debug +include::partial$acb-reusable-steps.adoc[tags="open-run-debug"] +. In the launch configuration dropdown, select the run configuration you created. +. Click *Start Debugging* (F5) or *Run Without Debugging* (Ctrl+F5 on Windows, Cmd+F5 on Mac). ++ +Anypoint Code Builder packages and deploys all projects to the embedded Mule runtime engine. The integrated terminal shows Maven and deployment progress for each project, and the status bar indicates that the applications are running. + +[[update-config]] +== Update an Existing Configuration + +To modify which projects run in the configuration: + +. Open your `.code-workspace` file. +. Locate the launch configuration by name. +. Update the `mule.projects` array to add, remove, or reorder projects. +. Save the file. ++ +The updated configuration is immediately available in the *Run and Debug* panel. + +== See Also + +* xref:int-run-mule-apps-with-properties.adoc[] +* xref:ref-launch-json-properties.adoc[] +* xref:start-workspaces.adoc[] +* xref:int-debug-mule-apps.adoc[] +* xref:int-create-integrations.adoc[] diff --git a/modules/ROOT/pages/ref-launch-json-properties.adoc b/modules/ROOT/pages/ref-launch-json-properties.adoc new file mode 100644 index 000000000..d340dbb6e --- /dev/null +++ b/modules/ROOT/pages/ref-launch-json-properties.adoc @@ -0,0 +1,284 @@ += launch.json Configuration Properties Reference +:page-deployment-options: desktop-ide + +include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] + +Configure how Mule applications run and debug locally in Anypoint Code Builder by editing the `launch.json` file in your project's `.vscode` folder. Use launch configurations to pass runtime arguments, change debug ports, switch between environments, and run multiple applications concurrently. + +Use `launch.json` configurations to: + +* Pass runtime arguments (encryption keys, environment variables, JVM properties) +* Change the debug port to avoid conflicts when running multiple applications +* Create multiple run profiles for different environments (Development, QA, Production) +* Run multiple Mule applications concurrently in the same workspace +* Test the same application with different property values without editing code + +[[property-reference]] +== Configuration Properties Reference + +This table lists some common properties for launch configurations. + +[%header,cols="20a,15a,65a"] +|=== +| Property | Required | Description + +| `type` +| Yes +| Specifies the debugger type. Must be `"mule-xml-debugger"` for Mule applications or `"munit-xml-debugger"` for MUnit tests. + +| `request` +| Yes +| Specifies the launch type. Must be `"launch"` to start a new debug session. + +| `name` +| Yes +| Display name for this configuration. Appears in the Run and Debug view dropdown menu. Use descriptive names like `"Debug - Development"` or `"Run QA Environment"`. + +| `mule.project` +| No^1^ +| Path to a single Mule project. Use `"${workspaceFolder}"` for the current project. For multiple projects, use `mule.projects` instead. + +| `mule.projects` +| No^1^ +| Array of project paths for running multiple Mule applications concurrently. Example: `["${workspaceFolder:project1}", "${workspaceFolder:project2}"]`. See xref:int-run-multiple-mule-apps.adoc[]. + +| `mule.home` +| No +| Path to the Mule runtime home directory. Use `"${config:mule.homeDirectory}"` to reference the configured Mule installation. Typically not needed as it defaults to the configured runtime. + +| `mule.runtime.args` +| No +| Command-line arguments passed to the Mule runtime JVM. Use the `-M-D` prefix for system properties. + + + +Examples: + +`-M-Dencryption.key=myKey` (encryption key) + +`-M-Denv=dev` (environment selector) + +`-M-Dhttp.port=8082` (HTTP listener port) + + + +For more information, see xref:int-run-mule-apps-with-properties.adoc[] and xref:int-create-secure-configs.adoc[]. + +| `mule.debug.port` +| No +| Port number for the Mule debugger. Default: `6666`. Change this value when running multiple applications concurrently to avoid port conflicts. Example: `6667`, `6668`. + +| `noDebug` +| No +| Set to `true` to run the application without attaching the debugger. Useful for performance testing or when you don't need breakpoint debugging. Default: `false`. + +|=== + +^1^ Either `mule.project` or `mule.projects` must be specified, but not both. + +[[multiple-configs]] +== Creating Multiple Configuration Profiles + +Create multiple launch configurations to test different environments without modifying your application code. Each configuration can have different runtime arguments, debug ports, and environment settings. + +The following example shows three configurations for Local Development, QA, and a Mocked environment: + +[source,json,linenums] +---- +{ + "version": "0.2.0", + "configurations": [ + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Debug - Local Dev", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Denv=dev -M-Dencryption.key=devKey123", + "mule.debug.port": 6666 + }, + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Debug - QA Environment", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Denv=qa -M-Dencryption.key=qaKey456", + "mule.debug.port": 6667 + }, + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Run - Mocked Services", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Denv=mock -M-Dmock.services=true", + "mule.debug.port": 6666, + "noDebug": true + } + ] +} +---- + +=== Switch Between Configurations + +To switch between run configurations: + +. Open the *Run and Debug* view from the activity bar (image:icon-run-debug.png["",18,18]). +. Click the configuration dropdown in the debug panel. +. Select the configuration to use ++ +(for example, *Debug - QA Environment*). +. Click *Start* (image:icon-start-debug.png["",18,18]) or press *F5* to launch. + +The selected configuration remains active until you select a different one. + +[[debug-port]] +== Configuring the Debug Port + +The default debug port for Anypoint Code Builder is `6666`. Change this port when: + +* Running multiple Mule applications concurrently in the same workspace +* The default port conflicts with another service on your system +* Testing port-specific debugging scenarios + +=== Change the Debug Port + +Add or modify the `mule.debug.port` property in your launch configuration: + +[source,json] +---- +{ + "configurations": [ + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Debug on Port 6667", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments}", + "mule.debug.port": 6667 + } + ] +} +---- + +Each concurrent application must use a unique debug port. For example, if running three applications simultaneously, configure them with ports `6666`, `6667`, and `6668`. + +[[common-examples]] +== Common Configuration Examples + +These are some configuration examples for common scenarios. + +=== Pass Encryption Keys for Secure Properties + +[source,json] +---- +{ + "configurations": [ + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Debug with Encryption Key", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Dencryption.key=mySecretKey" + } + ] +} +---- + +For more information, see xref:int-create-secure-configs.adoc[]. + +=== Switch Between Environment Property Files + +[source,json] +---- +{ + "configurations": [ + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Development Environment", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Denv=dev" + }, + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Production Environment", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Denv=prod" + } + ] +} +---- + +This configuration works with property files named `dev.secure.yaml` and `prod.secure.yaml` that use the `${env}` variable in your Mule configuration XML. + +=== Run Multiple Applications Concurrently + +[source,json] +---- +{ + "configurations": [ + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Run Multiple Apps", + "noDebug": true, + "mule.projects": [ + "${workspaceFolder:salesforce-integration}", + "${workspaceFolder:database-service}", + "${workspaceFolder:api-gateway}" + ], + "mule.runtime.args": "${config:mule.runtime.defaultArguments}" + } + ] +} +---- + +For more information, see xref:int-run-multiple-mule-apps.adoc[]. + +=== Use Environment Variables + +Reference OS environment variables using the `${env:VARIABLE_NAME}` syntax: + +[source,json] +---- +{ + "configurations": [ + { + "type": "mule-xml-debugger", + "request": "launch", + "name": "Debug with Env Variables", + "mule.project": "${workspaceFolder}", + "mule.home": "${config:mule.homeDirectory}", + "mule.runtime.args": "${config:mule.runtime.defaultArguments} -M-Dencryption.key=${env:MULE_ENCRYPTION_KEY} -M-Denv=${env:MULE_ENV}" + } + ] +} +---- + +[[create-launch-json]] +== Create or Open launch.json + +To create or open the `launch.json` file: + +include::partial$acb-reusable-steps.adoc[tags="open-command-palette"] + +. Enter and select `Open 'launch.json'`. ++ +If the file doesn't exist, Anypoint Code Builder creates it in the `.vscode` folder of your project. + +. Edit the configuration properties as needed. + +. Save the file. + +The new or updated configuration appears in the *Run and Debug* view dropdown. + +[[see-also]] +== See Also + +* xref:int-run-mule-apps-with-properties.adoc[] +* xref:int-create-secure-configs.adoc[] +* xref:int-run-multiple-mule-apps.adoc[] +* xref:int-debug-mule-apps.adoc[] +* xref:int-test-munit.adoc[] +* xref:int-migrate-studio-to-acb.adoc[] +* xref:ref-mule-settings.adoc[] From abbe38a14ea8b4a2a0ac72126ce588bc6d80e0b2 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque <46459586+Cristian-Venticinque@users.noreply.github.com> Date: Wed, 8 Jul 2026 15:13:07 -0300 Subject: [PATCH 2/2] Apply suggestion from @Cristian-Venticinque --- modules/ROOT/pages/ref-launch-json-properties.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/ref-launch-json-properties.adoc b/modules/ROOT/pages/ref-launch-json-properties.adoc index d340dbb6e..8b8cb0ae1 100644 --- a/modules/ROOT/pages/ref-launch-json-properties.adoc +++ b/modules/ROOT/pages/ref-launch-json-properties.adoc @@ -1,4 +1,4 @@ -= launch.json Configuration Properties Reference += Launch Configuration Properties Reference :page-deployment-options: desktop-ide include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"]