سؤال

I am creating ScheduledTaskAgent as dll (selected in template while creating project as Windows Phone Scheduled Task Agent). When I use it in main project, background service is running properly, but I am not able to set debug point. Also, I used Debugger.Break(), still break point does not hit.

I am using Simulator. When I try to launch Background application every 10 seconds, it doesn't even in debug mode.

ScheduledActionService.LaunchForTest(task.Name, TimeSpan.FromSeconds(10));

هل كانت مفيدة؟

المحلول

Pranit, you cannot debug Background task agents the same way you debug normal windows phone projects. Here are some techniques used.

http://developer.nokia.com/community/wiki/Background_Agents_Debugging_Tips_on_Windows_Phone

I have used the ShellToast successfully to debug my agents. IMPORTANT: Remember to remove/comment all those code you add before deploying, or use #IFDEF statements.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top