Now, this isn’t new! But, this week in Sweden, I spoke to a developer who has been using Delphi for years and didn’t know about this handy trick. As I am currently working over a series when I’m developing a RESTful backend and client, it makes sense to show how to add the REST Debugger into the IDE menus.
“Configure Tools” inside RAD Studio
At the top of the IDE you will find the Tools Menu. You might normally go straight to the Options (to configure the IDE) or Getit Package Manager (to download components), but there is also Configure Tools… which manages the list of items underneath it.
With the release of RAD Studio 10 Berlin, it is now possible to modify the look of TListView Items, TListView Header and TListView footer using the Toggle DesignMode.
When you right-click your list view on the Form Designer and select the new Toggle DesignMode, you enable the visual list view item editor. Rather than having to manually adjust the position of each component that makes up the item layout, you can now visually modify the control.
I did a blog post recently about Castalia which includes a video demoing some of the additional features Castalia adds to super charge the RAD Studio IDE.
Having played with it for over a month now, I’m really excited that it will have tighter integration in the future following the announcement yesterday that Castalia has been acquired by Embarcadero.
In addition to the news on Castalia, Usertility has also being acquired. This brings some exciting possibilities for the future around analytics and I can’t wait to see what happens further with this powerful add-on. Can’t wait to see how this fits into the single code base native IoT and multi-device development that we have today!
One present I’m going to be playing with over Christmas is the Castalia IDE plug in. If you want to know why, check out the 10 minute demo here of some of the cool refactoring and IDE tools that Castalia provides.
When developing software for multiple platforms you often need to debug and run applications on machine and devices that are not your development PC. The RAD Studio and Appmethod approach to this is an ingenious little program that acts as a go-between from the IDE to the remote device / machine. Called PAServer (PA = Platform Assistant) allows the IDE to retrieve the full call stack at run time, pause code with break points, inspect values etc, exactly as you would do debugging a local application.
PA Server is often used on a Mac OS X target for running and debugging applications to Mac OS X, iOS Simulator and iOS Devices, however there is also a windows version of PAServer and this can also be used to simplify preparing for deployment.
PA Server runs over TCP/IP and while developers often use it for local network work, in theory there is no reason why you can not use it to remote debug that trouble some customer where you can’t quite recreate what they are doing. (as long as they are happy for you to install the PA Server client on their machine).
PA Server is also great for deploying files directly to a remote machine when used with the Deployment Options for the project. This ensures that all the files specified are pushed remotely. This is great for updating a remote server or internal build machines.
Installation of PAServer
PA Server needs to be installed on the machine you want to run applications on remotely The install files both Windows and Mac OS X are located in the PAServer folder under your Appmethod / RAD Studio / Delphi / C++ Builder installation. e.g. with RAD Studio XE7 they are located at C:\Program Files (x86)\Embarcadero\Studio\15.0\PAServer.
Both installers (Windows / Mac OS X) just require you to push the next button a few times to install the server.
Running PA Server remotely…
PA Server is ultimately a Console application that you launch, enter a session password (that remote developers will need to connect to the session) and leave running without having to go back to it, but this is how to launch it on each platform.
..on MAC OS X
To launch PAServer on a Mac you have two choices.
Go to “Applications” and choose PAServer 15.0 (for XE7)
Use the new GUI in LaunchPad called PAServer Manager
If you use PAServer Manager you will see the icon appear at the top of your screen in the menu bar. Clicking on this allows you to “Add Server” (I just call it MyMac by default) and then start and stop the services as well as other useful things like viewing the information (such as IP Address etc). A lot easier than remembering command codes.
PA Server Manager is also useful for managing groups of developers who want to run multiple instances of PA Server on the same machine when developing.
..On Windows
To launch PA Server on windows once installed, you need to browse to the PAServer folder (typically C:\Program Files (x86)\Embarcadero\PAServer\15.0) and double click on the PAServer application.
Connecting to PAServer running on a Windows machine from the IDE
With PA Server installed, opened and a password set for the session, it is possible to make the remote connection (or even a loopback for a more advanced local test). To achieve this we need to configure a profile for connecting to the remote PAServer instance. – this is really quick to do.
Firstly select the desired compilation target of Win32 or Win64 in the Project Manager, and then right click and choose properties. The platform properties window is then opened allowing you to choose a profile for the target.
By default you will need to choose “Add New…” under platforms the first time you run this step, subsequently you will already have the profile saved.
Following the wizard for Add New, you can enter a name (e.g. MyPC) and then the IP address (port 64211 should be default unless you have changed it during install). Once you have the IPAddress or pc name entered you can “Test Connection” to verify that the path is working correctly.
If this fails then check you IP Address is correct – if unsure type “i” into the PAServer console and hit enter to get a list of the listening IPAddresses and check your firewall.
Once you have selected the Platform Profile and its tested, all you need to do is hit run just like before. Rather than deploying to your project directory, deploying to PA Server sends out all the files into a the PAServer scratch directory (under Documents\PAServer) e.g. C:\Users\Steve\Documents\PAServer\15.0\scratch-dir\
Tip for making things simple?
If you have selected any feature files or added your own files under Deployment Options when developing your applications, e.g. enabling InterBase, IBLite or DBExpress etc. These files will be packaged up for you when running out to PAServer giving you a complete folder structure with files ready for packaging. This also makes testing locally a lot lot simpler 🙂
Getting back to normal
Once you are done testing against a remote profile you can easily return to running locally by right clicking on the target and choosing to Revert to Default Connection.
One long term features of the Delphi / C++ Builder / RAD Studio and Appmethod IDE’s is the data explorer, however did you know it has had a great facelift recently to make it even easier to use and much more practical to work with?
Join me in this Skill Sprint video as I look in depth at the updates and changes to the data explorer and how its really come of age.
In this blog I want to take you through the steps for getting your Android device working with the standard USB device drivers, including steps to follow to check if what you have done has worked.
Jim McKeeth did a blog post a while back about installing custom specified Android devices that is worth reading if your device does not work with the standard drivers, however I would recommend trying this first.
Developer mode Enabled?
When you plug in your Android device, you will need to ensure you have enabled developer mode and confirmed that you want to enable USB Debugging. Under “Setting”, you should be able to see
{ } Developer options
as a menu item. If you don’t, tap “About phone” menu item 5 times to start the messages about going into developer mode.
It is also worth checking at this point that “USB Debugging” is enabled under developer options. You will still need to confirm on the phone when you finally have it all setup and you plug the phone in for the first time, but this is the first steps.
Phone drivers installed?
On windows, you need to have the drivers installed for the phone to enable it for developer work. Once you plug the device in, check the device manager. If it shows under Other Devices with a yellow alert, then you will need to update the drivers.
You can download the drivers if you search the web for them and point to those, or you can download and install them easily with the Android SDK Manager.
Launching the Android SDK Manager
To launch the Android SDK Manager, first open a command prompt and navigate to the android SDK tools folder. With Appmethod / RAD Studio they will be installed by default in the public documents. You can reach them using the cd command. e.g.
cd \Users\Public\Documents\Embarcadero\Studio\14.0\PlatformSDKs\adt-bundle-windows-x86-20131030\sdk\tools
From the SDK tools folder type in Android and hit enter and the SDK manager will open.
Installing the USB Drivers
With the Android SDK Manager launched you can now see the packages installed / to update. Specifically we are looking for the Google USB Driver. (see image below) Once found, choose “Install xx packages” button at the bottom of the screen.
Note: If you don’t see it, then install any packages that are pending update, close and re-open. It should then connect back to the Internet and refresh the list and make the Google USB Driver visible ready to install.
Updating the device driver
Once you have the drivers on your machine, the next step is to update the driver back in the device manager.
Choose to browse the computer and go back to the PlatformSDKs folder (path above) and choose to search sub folders.
If you have not already said to “always trust” google inc. You should see immediately be asked to confirm installing the driver.
Once installed the Android Composite ADB Interface driver will be installed and you will get confirmation.
At this point, you should be able to see in the device manager the device is installed.
With the phone drivers installed, it is now time to check the ADB command line can see your device. If it can, then you are ready to use it for development.
Checking ADB can see your Android device
To check that ADB can see your device, its time to head back to the command line and run the ADB application. ADB.exe lives in the ..sdk\platform-tools folder. From the command line you should be able to get there with something like…
cd \Users\Public\Documents\Embarcadero\Studio\14.0\PlatformSDKs\adt-bundle-windows-x86-20131030\sdk\platform-tools
Once your command prompt window is open at Platform Tools, run the following command to view the connected devices.
adb devices
The following screen below shows the output. Here I have my android device connected, but as yet I have not confirmed the connection on my phone as being allowed This causes the device to show as unauthorized.
If the android device shows as unauthorized then unlock the phone and choose to Allow USB debugging.
Once the device is approved, you should be able to re-run the ADB devices command and see the device id nows shows the status of “device”
At this point you are ready to use your android device for development! Refresh your Android devices in your IDE (right click on Android as a Target platform in the Project Manager and it will become visible.
Programming with Delphi & InterBase
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.