I'm trying to use Charles Proxy to debug traffic from the Windows Phone Emulator, but if I run the emulator after starting Charles Proxy, the emulator cannot connect to the internet at all. The traffic from the emulator is not picked up in the Charles Proxy session window either, but traffic from Chrome on Windows is.
At this stage I just want to get ordinary http working, what do I need to do?
I've not used Charles Proxy.
But you can use Fiddler with the emulator
download from http://www.fiddler2.com/fiddler2/
instructions for wp7 emulator at http://phone7.wordpress.com/2010/10/17/fiddler-and-wp7-emulator-working/
This works well for me
Related
Currently, I am trying to make my website support PWA. After implementing it, it works on the browser from the desktop where the button to install it is available on the address bar, but when I tested it on my mobile locally, somehow it won't prompt the "Add to home screen" popup.
Could the reason be that I run it locally, as it only uses the HTTP protocol? Or I missed something in order to set up for that popup specifically? My website is on Laravel 7.
Hope anyone could help enlighten me with this issue.
Thank you.
UPDATE: Solved it. Apparently by running the website locally with exposed public port using ngrok with HTTPS protocol, I am able to simulate how the app will behave on the mobile and the "Add to home screen" popup finally appeared.
PWAs by definition need HTTPS connections to be installed and run properly (as you said). On your development machine you are making use of the exception for "localhost". On your mobile device, you are not accessing the site locally as it is not hosted on the device itself.
Ive got a bug that only shows up in mobile chrome browser on my iphone - iOS8. Whats odd is that the same bug doesn't show up in iOS8 safari on the same phone.
I want to debug the issue in the chrome browser but can only find info on debugging safari, is there a way to debug ios Chrome ?
To debug Chrome on iOS I use weinre and ngrok
Weinre will give you a local debugger on a local port
https://people.apache.org/~pmuellr/weinre/docs/latest/
ngrok creates a proxy to a port on you comp (point to weinre)
https://ngrok.com/
then change the weinre tag to the ngrok generated one and you will get logs and the DOM while debugging remotely
You could try to install 'Responsive Web Design Tester' extension in a Chrome browser in PC and test with the same iPhone model you have.
https://chrome.google.com/webstore/detail/responsive-web-design-tes/objclahbaimlfnbjdeobicmmlnbhamkg?hl=en
I am trying to debug my hybrid cordova app using weinre (following this guide)
192.168.1.202 is the IP of my pc.
I have run my weinre server using this
weinre --boundHost 192.168.1.202
then displayed my client interface using this
http://192.168.1.202:8080/client/#anonymous
added the folling line to my html page
<script src="http://192.168.1.202:8080/target/target-script-min.js#anonymous"></script>
and run my app.
My device (wp8.1) is on the same network as my pc. My firewall has been turned off on private network.
Why my target device is not identified (as displayed below)?
PS: I have an express version of Visual Studio so I dont have any another way to debug my hybrid app.
My firewall must be disabled on public network as well. This answers my post and makes it work.
Chrome can be run to support remote debugging by starting it via the command line with a prompt such as chrome.exe --remote-debugging-port=9222 --user-data-dir=C:/foo. This is often used to debug on android or iOs using a Browser on a Desktop Device but I would like to debug chrome running on a desktop PC. from a "client browser" on the same machine one can call localhost:9222 and see the server browser, calling localhost:9222/json will result in a json representation of the tabs open in the "server browser". This works just fine.
However, when I try to use another device in the same (wifi) network by calling [local IP]:9222 or [local IP]:9222/json (local IP is the IP of the server browser) I get a connection timeout. Is it possible to use remote debugging in such way? Are any other switches needed when starting the browser?
Edit I have found some use of forward tcp for the debugging of mobile devices, but there does not seem to be such a switch for chrome.
Edit 2 This seems to be a bit of a duplicate of the questions here and here however, as of yet I have not gotten the solutions presented there to work.
So, apparently this comes down to forwarding a port to localhost:9222. However, at least on windows machines I have no luck with SSH tunnels. Are there any other ways to forward on the machine?
As you've mentioned it, the solution is to forward the port 9222. Below you find approaches for Linux and Windows.
Linux
After having started chrome with
chrome --remote-debugging-port=9222
Forward the port
ssh -L 0.0.0.0:9223:localhost:9222 localhost -N
This way you can access the debuggin interface from an external device on port 9223 using a Chrome browser.
Windows
As seen in this answer, on windows (tested on 7,8) the easiest way to do portforwarding without 3rd party apps is via netsh
I've created a batch file with the following content. It has to be ran as administrator, and with no previous chrome windows open:
netsh interface portproxy delete v4tov4 listenport=9222 listenaddress=0.0.0.0
start /b cmd /c call "\program files\google\chrome\application\chrome.exe" -remote-debugging-port=9222
timeout 5
netsh interface portproxy add v4tov4 listenport=9222 connectaddress=127.0.0.1 connectport=9222 listenaddress=0.0.0.0
This way you can access the debuggin interface from an external device on port 9222.
Make also sure that no firewall is blocking the corresponding port.
You can achieve the same behaviour by adding the argument
--remote-debugging-address=[YOUR_EXTERNAL_IP_ADDRESS] as reported here, without any additional software other than Chrome itself.
I've successfully used RInetD for easy port-forwarding in Windows 7, tried this and it worked like a charm, externally debugging a Chrome browser in Windows from a Chrome in Mac/Ubuntu.
You can download rinetd from:
http://www.boutell.com/rinetd/
Unzip the file, create an empty file with any name (I used rinetd.conf), with this content:
0.0.0.0 9223 127.0.0.1 9222
The in Windows console run it with:
rinetd.exe -c rinetd.conf
And voila!
I'm runnning the Windows Phone Emulator and want to access the local host of the computer the emulator is running on. "http://localhost" doesn't work as well as using the ip address in the emulator's browser.
So, how can I access the localhost or any other PC available in the local network via the browser of the windows phone emulator?
Thanks
Konrad
Strange - it normally works. Perhaps some network configuration setting on your box is affecting it? Try running with fiddler too.