问题
When we remote a method (that is using generics) the remoting sink cannot seem to discover our method from the other identical named ones. Debugging with .net source code attached I've got it to where there is a MethodInfo.MakeGenericMethod
call. However I cannot look at any of the surrounding data as its been jit optimised.
I couple of weeks ago I came across a registry setting that would disable this setting (it specifically mentioned that it aid debugging with the source). However being a wally I've lost what I did with it and am having trouble finding it again.
回答1:
I don't know about a registry solution, but you can use an INI file to disable JIT optimazation.
The short version is create an .ini file (i.e. myapp.ini) with the following contents.
[.NET Framework Debugging Control]
GenerateTrackingInfo=1
AllowOptimize=0
Full Explanation Here
来源:https://stackoverflow.com/questions/279582/switching-off-the-net-jit-compiler-optimisations