How can we log exceptions and error for windows Phone8.0 app
I also want a mechanism to delete the logs after a period of time
Is there a method other than ISO to log error
thanks in advance
Write them to files in isolated storage. You can write code to iterate over the file system to clean them up. If this is just for testing use Windows Phone Power Tools to manually remove logs.
An alternative is to build a logging service and have your devices connect and write to it when they have a data connection.
Related
I am system admin and wondering if there is a way to start windows store app automatically during system restart? Using Window Server 2012 R2 64 bit. Thanks.
regards,
Lin
You can achieve that by creating a uri launch protocol and launch the app by this protocol.. this is the only way I see in this situation.
See more here:
https://msdn.microsoft.com/en-us/windows/uwp/launch-resume/handle-uri-activation
UPDATE:
Now for launching that automatically, use start command, this command allow us to start modern apps (Windows Store Apps).. for example, this will launch the store # home page:
start ms-windows-store://home
In real scenario:
create .cmd file and write your command name (Your app protocol) and move this file to C:\Users\{username}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
I tried the same a few weeks ago but for now is not supported. please read this answer UWP app start automatically at startup
I'm new to Win RT development and I'm currently developing a windows RT app in which I've sent a debug build of my app to the tester. I'm wondering where can I find the output of the debug messages? Would it be possible to redirect the debug output to a file?
I assume you use the system.diagnostics.debug to output the debug info.
In the desktop version .NET, you can add the Debug.Listeners to catch the log and output to file. But in the .NET for Store App, you can not add file listener.
The alternative way to log is using ETW (Event Tracing for Windows).
Code Sample: Logging Sample for Windows Store Apps (ETW Logging in WinRT)
The blog HOW TO WRITE LOG FILES IN WINDOWS STORE APPS also introduced several ways to log in Windows Store App.
we have a windows 8.1 app in the windows store that sometimes crashes or hangs and we are unable to receive reports about hangs and crashs reported by the user via the store.
Collecting of telemetriy data is enabled in the store like mentioned in this MSDN-Article(http://msdn.microsoft.com/en-us/library/windows/apps/hh967787.aspx).
So I did a crash of the app by myself, took a look in the WER-ReportArchive(%localappdata%\Microsoft\Windows\Windows Error Reporting) and found a .cab & .wer-file. So I think the report was sended to microsoft, but theres still no crash or hang documented in the Dashboard of the App Store.
I tried to get a crashdump via Windows Error Reporting - LocalDumps (msdn.microsoft.com/en-us/library/ bb787181%28VS.85%29.aspx), but this dump is only generated when an error occurs.
In my case mostly the app just hangs!
I also tried to configure Windows Error Report - Registry Entries (http://msdn.microsoft.com/en-us/library/bb513638%28VS.85%29.aspx), but it seems most of the entries are just ignored.
I noticed WER is creating a dump-file of AppHangs as well, before sending the data to Microsoft (memory.hdmp in ReportQueue). But this files are deleted immediately after sending.
Does somebody know a way to get memory dumps and further information for AppHangs as well?
Thanks in Advance.
I think you could use the posibility of Just-In-Time or postmortem debugging via setting registry key for AeDebug, if you can create the crash.
Have a look at:
Improving apps with Quality reports
https://blogs.msdn.microsoft.com/windowsstore/2012/06/27/improving-apps-with-quality-reports/
Debugging a Windows 8.1 Store App Crash Dump
https://blogs.msdn.microsoft.com/ntdebugging/2014/01/13/debugging-a-windows-8-1-store-app-crash-dump/
Configuring Automatic Debugging https://msdn.microsoft.com/en-us/library/bb204634(vs.85).aspx
Using WER: Collecting User-Mode Dumps https://msdn.microsoft.com/en-us/library/bb787181(v=vs.85).aspx
Enabling JIT-Attach Debugging https://msdn.microsoft.com/en-us/library/2ac5yxx6.aspx
I have a WP8 App where I want to store the crash logs if and when generated.
Is there any way of fetching the crash dump file from Windows Phone 8 programmatically?
As far as I know, you can't retrieve the crash dumps that are automatically sent to the DevCenter. However, what you can do is subscribing to the global unhandled exception event handler, store the exception contents in the isolated storage, then do whatever you need with it (like sending it to a remote server). That's what many applications do, and it's even automated by some libraries (such as Telerik).
You can achieve that by using a logging system as MetroLog. You'll be able to collect these crash logs if you configure GlobalCrashHandler that will ensure that a FATAL log entry is written if an unhandled exception occurs.
You can install it using NuGet
Install-Package MetroLog
Here's an quick example:
using MetroLog;
using MetroLog.Targets;
LogManagerFactory.DefaultConfiguration.AddTarget(LogLevel.Trace, LogLevel.Fatal, new FileStreamingTarget());
GlobalCrashHandler.Configure();
ILogger log = LogManagerFactory.DefaultLogManager.GetLogger<MainPage>();
log.Trace("This is a trace message.");
You can find a tutorial explaining how to add it on your project at http://talkitbr.com/2015/06/11/adicionando-logs-em-universal-apps. Also there is an explanation regarding retrieving these logs.
how to load the mysql server in android emulator
i.e
Class.forName("com.mysql.jdbc.Driver")
i got the exception java.land.ClassNotFoundException in com.mysql.jdbc.Drive
please reply me.
This assumes MySQL is publicly available from internet, but it is never good idea .
Setup public WebService and connect to it from mobile application.
You won't be able to run MySQL server on an Android device.
What you're doing, however, is trying to load the MySQL client library. That isn't included as part of Android so you cannot load it. You'd need to include the relevant JARs in your project, if you really do want to connect to a remote MySQL database from an Android app.
If you do want to store and access data on your Android device, the awesome SQLite database is included by default, including all the APIs you need to create, upgrade and otherwise interact with SQLite databases.
When I did this I created PHP files for the database operations. I sent data in XML and received data in XML all using PHP scripts. I found this to be the easiest way for me...but you need to know PHP of course.