I'm running into an issue with the Android Studio Network Profiler. I can't see any of the network requests for my application. I'm currently using Retrofit 2. It seems the Profiler was built to work with OKHttp.
From my understanding Retrofit is built on top of OKHttp, so I'm not sure if there's something I'm missing to see the log data.
Version:
com.squareup.retrofit2:retrofit:2.5.0
It turns out that Retrofit will log in the Android Profiler. Unfortunately, in my case, the app was crashing during an initial network call. Despite launching the app in debug mode even with the debugger attached, it seems Android Studio didn't have enough time to fully initialize the Profiler and log any data.
Related
I followed this tutorial to create a simple web job in Azure: https://learn.microsoft.com/en-us/azure/app-service/webjobs-sdk-get-started. The web job itself does its job, consumes the message in the queue and I see them appear in Application Insights.
However, I want to debug the function on my local machine by using the tools available in Visual Studio 2022.
I have published with following profile settings:
Next I've attached the debugger under het Hosting menu:
First thing I noticed is a message about no symbols being loaded when putting a breakpoint in the function:
When I add a message to my queue, it gets consumed by the web job but the breakpoint is never hit. I've been reading a lot of similar questions regarding a this issue but I'm not progressing any further.
In Azure Portal, I've enabled Remote debugging under Configuration > general settings
In Visual Studio 2022, I checked if the correct process is attached
Here I'm a bit confused thou, the connection target is connecting through port 4024, which is according to this document, the port for Visual Studio 2019. However, a connection target with port 4026 is not found.
What am I missing here? Am I forgetting another setting somewhere?
If have tried changing the stack setting .NET version from APS.NET V4.8 to NET 6 (LTS) but that didn't help.
Should the platform architecture match the architecture of my machine in order to get it to work? Or is this not linked in any way with the debugger?
Is there anything else that I should check or try? Because my hair is turning grey here :)
Apologies for the delay here!
It should be 4024 for both 32 and 64 bit.
See this Azure doc: Remote Debugger Ports on Microsoft Azure App Service
Typically, the error “The breakpoint will not currently be hit. No symbols have been loaded for this document.” -- This error message indicates we can start debug process and attach, but cannot set a breakpoint on any or some lines of code in the project.
Most, likely cause: Application is built without debug symbols or debug symbols are not available
Kindly try these steps:
Verify Debug Symbols are being used and published and in sync
Workaround the issue by disabling “Enable Just My Code” from the
Tools >> Options >> Debugging >> general menu in Visual Studio
Other things to narrow-down the issue:
Debug symbols must be available locally or deployed to the Azure App Service, and must match the local code you are trying to debug.
It is recommended to use Cloud Explorer over Server Explorer to
connect and debug which requires the Azure SDK.
You could optionally Manually Attach a Debugger to Azure Web Apps to troubleshoot this further or recommend this as a workaround.
(old blog, try similar steps)
Kindly verify the port (Visual Studio remote debugger port assignments ) required is open in the corporate firewall and on your local machine.
As a test, you may use tool like Wireshark/netmon, to see if the port successfully connects to the port (4024) needed by the process.
Steps to Reproduce
Setting wrong DNS at Ipad wifi setting (ex: 5.6.7.8)
Run App, Request HttpClient.PostAsync
App Frozen
Expected Behavior
Response Error in Catch()
Actual Behavior
App Frozen
Environment
Microsoft Visual Studio Enterprise 2019
Version 16.5.2
Xamarin.iOS and Xamarin.Mac SDK 13.16.0.11
Ipad Ios 12, 13, 14
System.Net.Http 4.3.4
I have a Xamarin.Ios application, which has a function that uses HttpClient.PostAsync
In case the Ipad is setting DNS correctly, the app works normally, no problem
However, when the DNS setting is wrong, the app will freeze, when running to handle HttpClient.PostAsync
At the output, I'm seeing that Task PostAsync cannot be completed (for a long time there is still no error at Catch())
I have tried on many different devices
and also try on different versions of System.Net
But still can't solve
This can happen if you are running that command on the UI thread. In that case that is expected to happen. As such you need to start the process on a new thread using System.Tasks.Task.Run.
I've tried using the standard Blazor template app to remote debug on an Azure app service and I get the following error:(the app run fine if a compile to release, though not debugging of course.)
I compile to debug any CPU.
UPDATE
I can debugger in my .razor pages.
PRIVIOUS
Judging from your error message, the problem may be caused by unsuccessful release of some files and other factors when the program was released.
In order to solve your problem, you can tell us the version of Visual Studio you are using and how you created the project. This problem is mostly related to your development tool environment configuration.
Here is a suggestion, test it by yourself and it runs normally.
Visual Studio 2019 Enterprise Edition (other versions should also be normal)
Configuration before project release
Start remote debugging
The final result
I have implemented loading data from Azure Easy Tables in my Xamarin.Forms app.
App loads data which depends on their parameters (name).
The app only works fine on one Android emulator (Android 6.0 API 23). When I run it on other Android emulator even with the same Android version the data wont't load. All emulators are connected to internet.
Even real device can not load data.
Is the problem somewhere on Azure, Code or ?
Thanks for your answers !
I am trying to develop android and iOS application using xamarin.forms. And already completed the main part that includes Canvas drawing. For that, I have used Skiasharp, to perform operations on bitmap images.
Now, in android,
1. If I try to dispose bitmaps that I initialized before I get SIGSEGV fatal error. (I think this issue is not OS specific)
2. When I continuously run my app for 20-22 minutes, app crashes suddenly.
And in iOS,
my iphone gets hanged when I run my app for long time. And it doesn't start until I uninstall app from iFunBox in my pc.
I wanted to ask if there are ways in xamarin.forms or in native projects to find out where my memory is leaking.
How can I know how much memory of RAM is actually being used at the moment ?
Thank you
For Android, you can use the Android Debug Monitor tool. This is a tool that is installed as part of the Android SDK.
Below is the URL for more information:
https://www.codeproject.com/Articles/798462/Diagnosing-Memory-Usage-in-a-Xamarin-Android-Appli
For iOS, you can try to use the native XCode Instrument.
Below is the URL for more information:
https://developer.xamarin.com/guides/ios/deployment,_testing,_and_metrics/using_instruments_to_detect_native_leaks_using_markheap/
Also, Below is a useful article that talk about Xamarin.Forms Memory management.
Hopefully it will be helpful.
https://igorelikblog.wordpress.com/2016/07/08/xamarin-form-memory-management/