Jump to content
Sign in to follow this  
Al T

Can Delphi 11 IDE handle debugging two Android phones at the same time?

Recommended Posts

I have a Galaxy S8 and a Google Pixel 6.  I would like to debug on both phones at the same time, if possible?

 

Share this post


Link to post
33 minutes ago, Al T said:

I would like to debug on both phones at the same time, if possible?

I doubt it is possible with one instance of Delphi. Might be better to explain why you need it - there may be an alternative.

Share this post


Link to post
15 hours ago, Dave Nottage said:

I doubt it is possible with one instance of Delphi. Might be better to explain why you need it - there may be an alternative.

I hope this don't offend you, but it's pretty obvious why one would want to run debug on both phones at the same time.

 

1. You don't have to run debug "twice", which means switching phone menu, waiting for a recompile ...etc...

2. While one application is running it's task, you can setup the other application to run it's task.  (Two tasks running at the same time is better than having to repeat the process and time to weight again and again)

 

Based on my previous posts here on these forums, someone might actually know I'm moving around data / copying data.  It's going to be large amounts of data on mobile phones.  I need to wait for the task to complete and for it to do it right.  It can take hours for the task to complete.  Doing one phone at a time is very time consuming.

 

The tasks I have my phone doing for an application can take up to an hour before the "bug" would hit.... If I could run that task on both phones at the same time, I would save myself time in trying to find that issue.  I would then have two reference points going instead of one.  Especially trying to hunt down any segmentation faults that nobody likes to help with...then it ends up being the fault of Delphi not being able to keep up with itself.... memo1.lines tends to have issues with fast updating in Android and will constantly fault when it says lines are over-lapping.  Also like in a early situation where I found out that updating label component too fast in Android creates a segment fault because it was running in separate threads and two or more threads would over-lap and try to update the same component.

 

*** Overall: Having two phones and being able to debug them both... especially when the tasks can take hours to complete... would be a major plus.   I understand a lot of apps don't require such long tasks... but some do.  It would be a major plus to be able to debug two or more phones at the same time.

 

I could "cheat" and make the tasks take less time by shortening how much data has to be moved around, but it won't replicate real world problems.  I'd rather just wait to make sure the tasks are repeatedly have no bugs.

 

Edited by Al T

Share this post


Link to post

You can start multiple instance(s) of the IDE, that seems like a logical way to debug your applications. Instance 1 you would select phone 1 and Instance 2, select phone 2.

21 minutes ago, Al T said:

It can take hours for the task to complete.

I am more curious about the behavior of Android, does the OS ever kill your application? Or does it seem stable?

Share this post


Link to post
6 hours ago, Al T said:

I need to wait for the task to complete and for it to do it right.  It can take hours for the task to complete.  Doing one phone at a time is very time consuming.

Fair enough - I'd first try 2 instances of Delphi as SwiftExpat has suggested (have you tried this?), otherwise if that's too problematic: the second instance running in a Virtual Machine.

Share this post


Link to post

You can run/debug multiple executables in a project group at the same time. Build all the project group (you can't compile one while the other is running) then run each in turn. A quick test has a local Windows 64 bit app window and one on Linux VM.

RunMultipleProjectGroup.png

  • Like 1
  • Thanks 1

Share this post


Link to post
39 minutes ago, Brian Evans said:

You can run/debug multiple executables in a project group at the same time

Wow, I learned something new. I verified with a VCL and FMX app at the same time, the debugger attaches to both.  Just curious, do you do this often and is it stable (as stable as the IDE ever is and not counting application crashes)  attached to 2 processes?

Share this post


Link to post
3 hours ago, Brian Evans said:

You can run/debug multiple executables in a project group at the same time. Build all the project group (you can't compile one while the other is running) then run each in turn. A quick test has a local Windows 64 bit app window and one on Linux VM.

RunMultipleProjectGroup.png

Nice, but doesn't work for Android.  I Setup another folder and copied the first project to the new folder... then I build all.  Both projects build.  I run the first project and wait for it to load on the first android... then go to the next project, double click on it to make it BOLD... right click on the second project and the RUN and the RUN without debugging is Disabled!

 

So... I was really hoping it would work.  Both Phones show up as targets that can be used... just you can't run them both.

 

The odd thing is... I've read that Android Studio can do multiple phones at the same time.  Was hoping that Delphi could do the same.

 

 

Edited by Al T

Share this post


Link to post
10 hours ago, SwiftExpat said:

You can start multiple instance(s) of the IDE, that seems like a logical way to debug your applications. Instance 1 you would select phone 1 and Instance 2, select phone 2.

I am more curious about the behavior of Android, does the OS ever kill your application? Or does it seem stable?

Running multiple instances... might cause issues... but I'll try.

 

I've not had the Android kill my OS while doing long tasks... sometimes I'll lay back and watch YouTube while a task is running on one of the devices.  Android OS doesn't kill the app while it is running in the background.  I've left the phone doing one of these tasks over night and the next morning it was still running.

Share this post


Link to post

Havent't tried with Android but debugger has such option as "Attach to process". You don't need to run your app under debugger from the very beginning, you can attach to it right when a bug happens.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×