Learning VB.net

Posted 31 October 2017 - 12:57 AM

Hi Sir,

I'm new in Vb.net.Can Somebody explain in a easy way for understanding difference between Debug and Release Mode in Visual Basic .Net

I was having a hard time thinking why my code in debug can work properly but in release mode it's not working but not display any error.Only it return Nullexception for the code.I solve it already but right now been thinking why it happen and why it really work in debug but not in release?

I google and understand a little bit about this but not in a deep way.(also look at msdn but my english is not good btw i'm from asia region)

Please sir />!

This wasnt my code i mean i need to modify a certain code in there as i involve in Vision Cognex Machine Programmer.
We build the software for this machine.so i did not understanding a bit much code on that software as because dont have any senior here in our company.

link to see if you want (maybe somebody work in this scope,appreciate if you can provide me some advice):
www.cognex.com

Re: Learning VB.net

Posted 31 October 2017 - 01:47 PM

From my basic understanding, there are two main differences between the Debug and Release modes. They are just two different preset configurations for Building/Compiling the project's code. You can create your own configurations too.

When using the Debug configuration and you Build your project, the compiled code is not optimized, leaving you with a larger, slower, and not quite as efficient exe file. Being in Debug mode will also includes the (.pdb) file in in your debug folder which is used for debugging your code.

When using the Release configuration and you build your project, the compiled code is optimized, leaving you with a smaller, faster, more efficient exe file. Being in Release mode does not create and include the (.pdb) file.

Basically, if you are still designing and debugging your application, you will keep it in Debug mode with the Code Optimization setting turned off. When you are done designing it or want to ship out your latest stable version, you would build your application in the Release mode which uses optimization.