Debug helps to set methods and properties that helps in debugging code.If we use methods in Debug class for print debugging information and checking our logic with cases, you can make your application more robust without impacting the performance and code size.
Trace is used to release builds and instrumentation allows us to monitor the condition of our application running in real-life settings. Tracing helps us to know problems and fix them without interact a running system it also give you the step by step execution.
By Default Trace is enabled by default in visual Studio.
So code is generated for all trace methods in both release and debug builds.