When utilizing GENNET40 (https://www.synergex.com/docs/index.htm#tools/toolsChap4Gennet40utility.htm) 3 distinct files are generally generated as per the documentation (assuming you use interop.dbl as your output name):
interop.dbl is very simple and contains only this:
According to the documentation for .NODEBUG (https://www.synergex.com/docs/#lrm/lrmChap5NODEBUG.htm) this instructs the compiler to emit code that causes the runtime to be unable to set breakpoints within this code.What is the design rationale for doing this?
Internally at Computers Unlimited we have several scripts that at a high level simply discards this tool generated interop.dbl and instead opts to use interop1.dbl (renaming it to interop.dbl).
While it is understandable that this is a significant amount of generated code internally when debugging we find it very useful to set breakpoints within the generated code. For example we usually set a breakpoint on the "new DotNetAssembly(string)" call as this (for us) is usually the first time the interop assembly is being invoked. It is often helpful to attach a CLR Debugger right before/shortly after this call. Other times we have set debugging points just prior to the execution of the interop call to ensure that the proper variables are being sent or evaluating their return for error conditions.Is this bad? If so why?
How are other developers utilizing this API?
Is there a better way?