This article shows how to enable Developer Mode in your app server manually and through Dev Studio DXP, as well as how to configure other settings that may benefit you during development. Each topic is explained in the relevant section below.
Enabling Developer Mode Manually
Follow these steps to enabled Developer Mode in your app server manually:
-
Create a
portal-ext.properties
file in your server’s root folder if it doesn’t exist. -
Add the line below to it:
include-and-override=portal-developer.properties
Alternatively, add the properties from the portal-developer.properties file to your
portal-ext.properties
file that you want to use. -
Start your app server to apply the changes.
Read the next section to learn how to enable Developer Mode in Dev Studio DXP.
Setting Developer Mode in Dev Studio DXP
Follow these steps to enable Developer Mode for your app server in Dev Studio DXP:
-
Double-click on your server in the Servers window and open the Liferay Launch section.
-
Select Custom Launch Settings and check the Use developer mode option.
-
Save the changes and start your server.
Figure 1: The *Use developer mode* option lets you enable Developer Mode for your server in Dev Studio DXP.
Configuring FreeMarker System Settings
By default, FreeMarker theme templates and web content templates are cached. You can change this behavior through System Settings with the steps below:
-
Open the Control Panel and go to Configuration → System Settings.
-
Select Template Engines under the PLATFORM heading.
-
By default, the Resource modification check (the time in milliseconds that the template is cached) is set to
60000
. Set this value to0
to disable caching.
Your FreeMarker templates are ready for development. Next you can learn how to improve JavaScript file loading for development.
JavaScript Fast Loading
By default, JavaScript fast loading is enabled in Developer Mode
(javascript.fast.load=true
). This loads the packed version of files listed in
the
Portal Properties
javascript.barebone.files
or javascript.everything.files
. You can, however,
disable JavaScript fast loading for easier debugging for development. Just set
javascript.fast.load
to false
in your portal.properties
, or you can
disable fast loading by setting the URL parameter js_fast_load
to 0
.
Great! You’ve set up your server for Developer Mode. Now, when you modify your theme’s file directly in your bundle, you can see your changes applied immediately on redeploying your theme!