Posts Paul Vick explains what 'enable optimizations' actually does...
Post
Cancel

Paul Vick explains what 'enable optimizations' actually does...

Paul Vick noticed my question about what exactly does the enable optimizations option in VB.NET does.  In addition, he explains why turning this option on actually makes it difficult to debug the application, since some of the opcodes are removed since they are no longer necessary for your running application.  Some opcodes (NOP) are only there for the express purpose of allowing interactivity with the debugger and allowing you to set breakpoints on lines such as End If.  It also allows the CLR to optimize the finale compile (JIT), knowing that a debugger will not be in effect.  What I’ve stated here is a short summary of what Paul had to say, so be sure to jump over to his blog and read the full rundown.

This post is licensed under CC BY 4.0 by the author.