Wednesday, September 12, 2012

Changing Your Debug Build Location


Recently, we were contacted by a teacher who uses Real Studio in her classroom. Her students log into their computers with their network login IDs and connect to a student server where they save their work to a folder. However, her students found that after they ran their apps once, they were unable to do so again because the Application.Debug file that is created in their folder is continually in an opened state until the student logs out.

Normally when you run a project, it is created in the same folder as the project itself, which was the cause of this problem.  This usually makes the most sense, but there are times when it makes sense to instead build your app elsewhere.

These are some additional reasons you might want to have this debug application in a different location:
  • You keep your source code on Dropbox and don't want to have the debug builds automatically sync
  • You don't want the debug builds cluttering up your source control folder
  • You want to use a high-speed SSD for the debug build so that your projects build and launch faster
  • Your projects reside on a shared network drive causing debug builds to be slow or files to remain locked
So how do you change the debug build location?  It's actually pretty easy.  You use the Destination property of the App class.  This property is located in the Debugger section at the bottom of the Preference pane.


Destination Property of App Class

To choose an alternate path, click the "..." button on the right to get a Select Folder dialog.  Choose the folder to use and click OK.

The next time you run your project, the debug application will be built in this location instead of alongside the project.  Simply clear the property to have the builds again happen in the same folder as the project.

3 comments:

William LeVan said...

Also I would like to point out that with IDE Scripting you can set this property, so you don't have to each time. Just Start a new project and run your IDE Script.

Oliver Osswald said...

Correct me if I'm wrong, but we cannot set the actual build folder, right? I found 'Build unsaved apps in' under Real Studio IDE Preferences. The actual build is automatically saved into my project folder and messing with my git repo... Well, I guess I could move it out with a IDE script. But hey, why we have all this for debug, but not for final build?! Oliver

Paul Lefebvre said...

@Oliver: You are correct. The Destination folder is only for debug builds; it is not used for final builds. I agree that being able to locate a final build folder would also be useful. Go ahead and create a Feedback case for it.