Code Repo    |     RSS
MD's Technical Sharing



Thursday, March 12, 2009

Debug TodayScreenPlugin/HomeScreenPlugin

For PocketPC, make sure your today screen item is visible on the device and it is using the latest build so the debug files match up with the executable. Go to the Debug Menu, and choose "Attach to Process..." Change the Transport line from Default to Smart Device. Change the Qualifier drop down to the type of device you are using. If you haven't selected any devices lately you'll have to click the browse button and manually select your device type.


You'll see a list of processes running on your handheld, but only EXE processes can be attached to. Shell32 is the process that loads the today screen. If you are viewing the today screen it should say "Desktop" for the title.


Select the shell32.exe process and click Attach. Set a break point in the WM_PAINT handler of your today item click the start menu on the device. You should catch the WM_PAINT message the today menu invalidates your today item causing a refresh/redraw.


To debug a Home Screen Plugin (Smartphone) at runtime, you must attach the debugger to the home.exe process.


References:

1. http://russryba.vox.com/library/post/debugging-today-screen-items-in-visual-studio-2005.html

2. http://msdn.microsoft.com/en-us/library/aa455227.aspx

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.