Is it possible to get line numbers for stack trace on .Net CF 2.0 or 3.5

I have a .Net CF 2.0 application and I use log4net to log errors. I get a stack trace, but it does not have line numbers. I noticed that he was not trying to deploy the pdb file to the device, so I tried to manually put it in the same directory as exe. But it did not help.

+3
source share
3 answers

I'm not sure .Net CF will open pdbs. Also, I'm not sure if you want to deploy them to the device. If you are hardworking, you can make a tool to convert a stop call with offsets il to one with line #. I would suggest this post on Mike Stoyle's blog, which provides code for extracting information from managed pdb. Once you have a line to offset the map, creating a tool to handle these calls, perhaps.

+1
source

Have you tried to exclude exceptions due to their wrapping in the new exception? link

try {
       //code..

     }
 catch
     {          
        throw;
      }
0
source

In the project properties, check the "Assembly" tab, then "Advanced" ... then change the "Debug" drop-down information to full. These should be the default settings for Debug settings, so if you are creating in the Release section, make sure these options are enabled.

Good luck.

0
source

Source: https://habr.com/ru/post/1698989/


All Articles