I have a .Net CF 2.0 application and am using log4net to log errors. I get a stack trace, but it doesn't have any line numbers. I noticed that it doesn't appear to deploy the pdb file to the device, so I tried to manually place it in the same directory as the exe. But that didn't help.
views:
163answers:
3Have you tried to bubble up the exceptions with out wrapping them in a new exception; link
try {
//code..
}
catch
{
throw;
}
I'm not sure if .Net CF will open pdbs. Also I'm not sure you want to deploy those to a device. If you are industrious you can make a tool to transform a callstack with il offsets into one with line #'s. I'd suggest this post on Mike Stall's blog which provides code on extracting the info out of a managed pdb. Once you have the line to offset map making a tool to post process those callstacks is possible.
Under project properties, check the Build Tab, then Advanced... then change the Debug info drop down to full. These should be the default settings for Debug configuration, so if you're building under Release, make sure you have those settings enabled.
Good Luck.