Question

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));

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top