Remote debugger doesn't open breakpoint script anymore

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderator: Klaus

Post Reply
trevix
Posts: 1064
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Remote debugger doesn't open breakpoint script anymore

Post by trevix » Wed Nov 16, 2022 7:33 pm

I have the Power pack remote debugger correctely installed in my LC 9.6.9(RC2).
Up to this morning it was working.

Now, when I USB install the standalone on any of my test phones (5x,iPhone and Android) it seems to be working, but the "Test" button does not turn green and the app script stops at the first breakpoint, without opening the script at the breakpoint, that it is always been placed in the Preopenstack of the main stack.
This of course does not allow a debugging. Even romoving the breakpoint, the stack hangs at the following breakpoint.
If I uncheck Script Debug Mode, the standalone runs fine on mobile.

I tried:
- reinstall LC
- turn Script Debug Mode on and off
- turning the remote debug standalone setting on and off
- I confirm to be on the same Wifi, on all the phones and on the Mac

Unfortunatly in the afternoon I played with the SCRCPY remote control app (could be this? Modified my ADB connection?)
Now is disintalled it and I restarted the Mac a couple of times.

What can I do to make it work again?
Thanks for any help.
I really appreciate how much help I get from this forum. thanks, thanks, thanks...(I hope you are not muttering...ohhh nooo, Trevix again)
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

joseggarza
Posts: 44
Joined: Thu Jul 24, 2014 8:55 pm

Re: Remote debugger doesn't open breakpoint script anymore

Post by joseggarza » Tue Jun 20, 2023 9:43 pm

Hi Trevix,

I am using livecode 9.6.9 (stable) and I am having the same issue, but I tried older versions and the problem persist. I tried on mac and windows. The Remote debugger works fine in simulator but not on external devices.

were you able to find the solution for this issue?

JG

trevix
Posts: 1064
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Re: Remote debugger doesn't open breakpoint script anymore

Post by trevix » Wed Jun 21, 2023 9:17 am

Yes, resetting the LC preferences (deleting the folder "RunRev" from library/preferences).
But it did not last long.

Let me tell you that, while incredibly useful, the remote debugger has been poorly designed.
Its functionality is slow and bugs ridden.
More on that, instead of using the USB hard wiring to the controlled device, it is based on WiFi: which makes impossible any WiFi related debugging session.
Overall I am very dissatisfied with it, considering its importance for mobile development. I hope that LC will take care of it, sooner or later.

Regards
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Remote debugger doesn't open breakpoint script anymore

Post by jacque » Wed Jun 21, 2023 6:17 pm

Which OS? If Android, are you using the Test button or are you sideloading an app? LC installs the remote debugger when using the Test button but not when building a standalone. If you want remote debugging in a built standalone, you need to include it in Standalone Settings / Inclusions.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

trevix
Posts: 1064
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Re: Remote debugger doesn't open breakpoint script anymore

Post by trevix » Wed Jun 21, 2023 6:35 pm

Thanks Jacque, but I knew that.
I use it both on Android and iOS hardware.
I install the standalone from the test button and also, in some case, using the ADB connection (including in standalone setting the remote debugger).
I am not saying that it never works. It is that too often has problems.
Sometime if you remove a red dot from the code editor, while running RD, it crashes the desktop LC.
Sometime it is way too slow on tracing scripts. Or it doesn't pause when it should.
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Remote debugger doesn't open breakpoint script anymore

Post by jacque » Wed Jun 21, 2023 7:19 pm

Thanks Jacque, but I knew that.
Sorry, I meant to direct that to Jose.

I've had whole LC releases that didn't work at all and then started again on the next update. It's happened twice and I never did figure out why.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

joseggarza
Posts: 44
Joined: Thu Jul 24, 2014 8:55 pm

Re: Remote debugger doesn't open breakpoint script anymore

Post by joseggarza » Wed Jun 28, 2023 4:03 pm

Hello Jacque,

I apologize for responding so late. I'm using Win 11 with LiveCode 9.6.9. I believe it's more of an issue specific to my computer. Something is preventing LiveCode from starting the socket on my computer. Let me explain why.

I created a very simple stack, just for testing purposes, with only one button containing a breakpoint, and the breakpoint is set at the "Put" line.

Code: Select all

on mouseUp pButtonNumber
put "Hello World" into fld "Field"
end mouseUp
In the Android app's permission settings, I have enabled Internet access. I'm also including the Remote Debugger in the inclusions, although I know it's not necessary, just in case, and I've added the Internet and tsNet libraries as well.

It's a very simple test app.

When I click the TEST button in LiveCode, everything works fine, and it installs on my Android device.

Here's the interesting part:

1. The Test button in LiveCode doesn't turn green.

2. When I click the button on Android, it stops at the breakpoint because it doesn't display anything in the field. That tells me that it's working on Android, but the LiveCode socket isn't functioning.

3. If I go to the message box and enter "Put the opensockets," it only gives me the socket number, not the IP, which is what it should normally display: "ip:socket."

So, the question is, how can I view logs or debug LiveCode to figure out why the Remote Debugger socket isn't starting on the computer?

Thanks in advance for your time,

JG

joseggarza
Posts: 44
Joined: Thu Jul 24, 2014 8:55 pm

[Solved]Re: Remote debugger doesn't open breakpoint script anymore

Post by joseggarza » Wed Jun 28, 2023 7:34 pm

quick update,

The Problem was Hyper-V. Hyper-V has virtual switches. It has a Default Internal Switch with NAT and and External switch that connect directly to the NIC.

Windows computer is connected to the Virtual External Switch.. So, My windows 11 Nic has an external IP that connects to the Virtual external switch(hyer-v) that provides a real ip from the router.(192.x.x.x). Everything works OK with my computer and it has an IP from my network.

Well, Livecode decided for some wired reason to bypass windows environment and it was getting an IP from the Default Hyper-V Switch which has a NAT IP(172.x.x.x)

Once I remove Hyper-V the problem got solved... now, how can I make livecode not to get the IP from Hyper-V defualt switch but instead to use Windows Layer and use the Network from windows...

I already sent a ticket to Support... hopefully they can work on this bugfor future updates...

JG

revida
Posts: 1
Joined: Tue Jun 06, 2023 12:11 pm
Contact:

Re: Remote debugger doesn't open breakpoint script anymore

Post by revida » Fri Jun 30, 2023 10:59 am

Check Your Network Connection: Make sure your Mac and test phones are both connected to the same Wi-Fi network in order for remote debugging to work efficiently. This step is critical.

Verify ADB Connection: Since SCRCPY may have altered your ADB connection settings and functionality, double check that everything is configured appropriately and working smoothly.

Restart Your Devices: Reboot both your Mac and test phones to refresh their settings and connections; sometimes just restarting will fix connectivity issues.

Reinstall LiveCode: First uninstall LiveCode completely from your Mac computer, including its associated files, then reinstall its latest version for best results. Doing this ensures a clean installation experience.

Reset Debugging Settings in LiveCode: Before beginning debugging in LiveCode, check that both remote debug standalone is turned on as well as Script Debug Mode is active and that breakpoints have been properly set in Preopenstack Handler of main stack.

Test With Another Project: When investigating issues within your specific project, try creating another, simpler one with only minimal script. Doing this may allow you to discover whether or not they relate specifically or represent more generalized problems.

stam
Posts: 3061
Joined: Sun Jun 04, 2006 9:39 pm

Re: Remote debugger doesn't open breakpoint script anymore

Post by stam » Fri Jun 30, 2023 3:49 pm

of course being a Mac-user since the dawn of time (well, 1986), I took ADB to mean something completely different which made no sense at all!

Of course more likely than Apple Desktop Bus (https://en.wikipedia.org/wiki/Apple_Desktop_Bus) is that it's Android Debug Bridge in the context... But had me properly confused for about 90 seconds lol ;)

Post Reply