How to simulate highlight text for mobile devices on Chrome Dev Tools? - google-chrome-devtools

I'm curious if it's possible to simulate highlight text on "touchstart" via Chrome Dev Tools instead of testing directly on phone.
I tried mobile view but the touch icon doesn't seem to highlight the text when I drag it.
Thanks a lot.

This level of detail isn't available within Device Mode. You'd need to use an emulator.
Device Mode is only meant to provide the upper 85-90% of what most developers will need to test their web applications. It is not meant to handle everything (as that highlight UX is platform-specific) nor is it meant to replace actual device testing.

Pretty old question, But instead of an emulator now we can use chrome's new feature Remote Debugging.
Here are steps:
Enable Developer Options - To enable tap Build Number 7 times
Settings > About Phone > Build Number
The above location may vary depending on your Android version.
Enable USB Debugging
Settings > System > Developer Options > USB debugging
Connect your mobile device to your computer using USB cable and tap OK
to allow USB debugging.
Open chrome://inspect/#devices and in the Remote Target section check whether your device is listed, if not make sure to unlock your device.
In the Devices section, click Port forwarding and enter your website port(e.g: 8080) and then in the next field enter IP and port(e.g: localhost:8080)
Open chrome on your mobile and goto localhost:8080
You can still use chrome devtools to debug, simply click on inspect in the Remote Target section.

Related

how to debug in other window desktop device

i'm making windows app works like kiosk with serial port with card reader, printer and barcode reader.
I had a experience with ios and android application but it is my first time to make windows app.
Building and debug windows app in local has no problem. However, making a serial port code was a problem, i thought it will be similar with other phones like just connect the phone and run it but connecting the window device was not.
try to connect with usb, but cant see in avalable devices.
i was planing to make the code(like response code and return code) while looking debug log.
is there any way to debug like which we do debuging like android or IOS.
Or is there other way?
Follow the steps:
Found the app.so file in ..\build\windows
Copied the file and pasted it in ..\build\windows\runner\Debug\data
Original Source

Is that possible disable device switch in Visual Studio Code when develop flutter?

Is that possible disable device switch in Visual Studio Code when develop flutter ?
What's my condition:
I have simulator opened, and debug for a while, code for a while.
Then I need to plugin my phone to charge power of phone. But vscode too clever to switch the device to my phone automatic.
And then when I debug, I always found why it's build slow now? And found out that it's debugging on my phone now...
Any idea to solve this ?
PS: I didn't always have usb power for my phone beside my computer.
It seems that it's possible to disable that (default is on). Go to User Settings -> Extensions -> Dart & Flutter
You can also select device with this action:

Google Chrome dev tools do not display website on developer machine (when Remote Debugging Android Device)

Following the instructions here, I can see my Android device in Chrome on my developer machine in Chrome > DevTools > Main Menu > More tools > Remote devices.
I can see the website that the Android device has open. If I click Inspect, a new Chrome window opens on my developer machine, and I see the mobile width browser window open with Developer Tools on the right.
However, the website loaded on my Android device will not load in this window. I see a white screen. I click Reload, and the loading progress bar will display, but then I receive a white screen again.
I make sure the Android device screen is unlocked, repeat the process above, but I always end up with a white screen.
How do I fix this please?

iPhone not appearing in Develop menu in Safari

On my "Develop" menu, in Safari, the iPhone no longer appears after updating Safari to the latest version, making it impossible to inspect and debug sites and apps.
I restarted the iPhone, killed and relaunched Safari, restarted my Mac too, but the issue is still there. Affects both Safari mobile and phonegap applications.
Anyone experienced the same problem?
FWIW, I tried all of these suggestions, and it worked briefly after resetting Privacy & Location settings but stopped working immediately after.
What ended up working as a long term solution was to turn both WiFi and Bluetooth off on the iPhone while connected to the Mac.
Turns out, my issue was that the update to the latest iOS version disabled the "Web Inspector" settings on my iPhone.
To re-enable it, go to Settings > Safari > Advanced.
In our case we needed to reset the trust between iPhone & Mac. From iPhone Settings > General > Reset choose reset Privacy & Location and also Network Settings. The phone reboots, we reconnected to the laptop, tapped Yes to Trust this Computer and now Mac Safari can once again debug mobile Safari.
What helped for me was the following:
Open Xcode
On the Menu: Window -> Devices and Simulators
Check the Connect via network checkbox. (If it is already selected then uncheck it and re-check)
In my case, resetting only Privacy & Location did the job (but only temporarily, see update below!).
Try only resetting that before resetting your whole network settings for nothing!
Almost immediately after reset, the "Trust this Computer" popup appeared and after trusting my device appeared in the Develop menu.
Update:
I kept having regular issues with this (having to reset it multiple times per day, restarting Safari and a combination of other things) until I found the real fix here:
https://stackoverflow.com/a/58654871/167983
#BearSnowstorm:
One more tip to try - after trying many of the above suggestions I
turned off "Sync with this iPhone over Wi-Fi" in iTunes.
Voila! Got my iPhone into the Develop menu!
(for context, this is in Mojave 10.14.6, iOS 13.1.3, Safari 13.0.3)
My comment on that answer describes the same thing but updated for Catalina:
I had recurring issues with this and the only way I could make it work (sometimes) was to reset Location & Privacy, close Safari, unplug my device, etc. It was always a temporary fix though and the issues would come back very quickly. This however seems to work more permanently! I confirm what #Florian said: the setting was off by default for me, turning it on then off (after letting the sync finish) worked. On Catalina, this setting is named "Show this iPhone when on Wi-Fi" under General when you select your iDevice in the Finder.
Reading that answer my instinct was that it could not possibly make a difference, but it does! I have had zero issues since I did this. Try it!
Some cables (even official Apple Lightning Connector) don't support this feature because of some damage inside. My Lightning Connector was able to charge the iPhone but prevented to use dev tools on the Mac. I used another cable to successfully connect to dev tools.
In my case, this was totally a network issue.
Everything works well when I used 4G network.
If I use my wi-fi, safari failed to detect my device.
Turning off wifi on the iPhone allows it to appear in the develop menu.
The best and permanent solution in Catalina is to open a new Finder window, select in sidebar, then check 'Show this iPhone when on wifi'.
To disable caches (and to avoid constantly having to delete website data) open your site in a new Private Window. Changes to stylesheets will then update as normal.
Seems the front ports of my Mac Pro were not working correctly, plugged the cable on the keyboard port and I was able to connect to the dev tools.
I know all these tricks but after installing Catalina none of them worked. What DID work for me was Settings > Developer > Clear Trusted Computers. Strangely, the phone appears in the Safari Developer menu on the Mac, but the phone never asked to re-trust the computer!
The phone disappears again sometimes, but the same trick gets it back.
MacOS and iOS still look beautiful, but both are turning into a messy pigsty underneath. I sometimes wonder if Apple still even cares. :(
I've tried with the reset of Privacy and Location but it didn't work. What worked for me was disabling the hotspot from the phone. With the hotspot active Safari doesn't shows the iPhone in the developer menu.
Crazy but true, when i disconnected bluetooth and tried to check under develop option, connected device was shown.
In my case the only solution was to reboot my Macbook... stupid but effective solution
My solution was simply to move the cable to a different USB port.
reboot fix everything,works for me.
In my case, I was working from home and had a VPN tunnel to my work that was redirecting all traffic through my company's network. Disabling that revealed the phone in the Develop menu again.
As an alternative, connecting with VPN and disabling WIFI and Bluetooth works.

Running eclipse project on android device

i'm new into programming for android. And i have few problems with connecting and debugging my eclipse project on android device - which is my phone Samsung Galaxy SIII. According to this link I tried to launch my app on my phone. Saddly when i press run button it tells me that there's no android device connected. And as you may know im not that dumm to not plug it into my computer. Additionally i have USB Debug mode ticked in options. My PC recognises it as "SAMSUNG Android ADB Device".
Some of you might say that i should start using emulator to have better view how this app will work on other phones/versions of android/etc. Thing is that my PC is quite old, and running an emulator makes it respond so slowly that it's nearly impossible to do anything on this emulated device. Plus... im quite sure that i wont publish this app on play store so i dont need to know if it will work on other devices. I just want to make a weather widget for me since stock one that uses accuweather.com tends to fail weather forecast for my country (like it says heavy rain on sunny day).
So here are the things that i have done so far to try to launch:
1. Uninstalled device and set some new drivers that should have helped me - saddly not ;]
2. Tried launching it via command line
3. I found somewhere on the Internet that it is possible to connect and test your app via WiFi using tcpip over 5555 port... saddly it failed too.
Any ideas what else should i try to make it work?