Replace --debugmsg with WINEDEBUG.

diff --git a/documentation/configuring.sgml b/documentation/configuring.sgml
index c957f21..4f69529 100644
--- a/documentation/configuring.sgml
+++ b/documentation/configuring.sgml
@@ -662,8 +662,8 @@
             are all optional and you probably don't need to add or
             remove anything in this section to your config.</emphasis> (In extreme
             cases you may want to use these options to manage the amount
-            of information generated by the <parameter>--debugmsg +relay
-            </parameter> option.)
+            of information generated by <parameter>WINEDEBUG=+relay
+            </parameter> )
           </para>
           <para>
             <programlisting>"File" = "/blanco"</programlisting>
@@ -683,13 +683,13 @@
           <para>
             <programlisting>"RelayInclude" = "user32.CreateWindowA;comctl32.*"</programlisting>
             Include only the listed functions in a
-            <parameter>--debugmsg +relay</parameter> trace.  This entry is
+            <parameter>WINEDEBUG=+relay</parameter> trace.  This entry is
             ignored if there is a <parameter>RelayExclude</parameter> entry.
           </para>
           <para>
             <programlisting>"RelayExclude" = "RtlEnterCriticalSection;RtlLeaveCriticalSection"</programlisting>
             Exclude the listed functions in a
-            <parameter>--debugmsg +relay</parameter> trace.  This entry
+            <parameter>WINEDEBUG=+relay</parameter> trace.  This entry
             overrides any settings in a <parameter>RelayInclude</parameter>
             entry.  If neither entry is present then the trace includes
             everything.
@@ -1277,8 +1277,8 @@
         <itemizedlist>
           <listitem>
             <para>
-              Run the program with <parameter>--debugmsg
-                +loaddll</parameter> to find out which files are
+              Run the program with <parameter>WINEDEBUG=+loaddll</parameter>
+              to find out which files are
               needed. Copy the required DLLs one by one to the
               <filename>C:\windows\system</filename> directory. Do not
               copy KERNEL/KERNEL32, GDI/GDI32, USER/USER32 or NTDLL. These
@@ -1698,8 +1698,8 @@
 <para>
   A very useful help to find out which DLLs are loaded as built-in and
   which are loaded as native Windows file can be the debug channel
-  loaddll, activated via the Wine command line parameter
-  <command>--debugmsg +loaddll</command>.
+  loaddll, activated via the environment variable
+  <command>WINEDEBUG=+loaddll</command>.
 </para>
 </sect2>
 
diff --git a/documentation/debugging.sgml b/documentation/debugging.sgml
index 95d6342..d9afae5 100644
--- a/documentation/debugging.sgml
+++ b/documentation/debugging.sgml
@@ -230,10 +230,10 @@
         </para>
 
         <para>
-          The <parameter>--debugmsg</parameter> command line
-          option controls the output of the debug messages.
+          The <parameter>WINEDEBUG</parameter> environment variable
+          controls the output of the debug messages.
 	  It has the following syntax:
-	  <parameter>--debugmsg [yyy]#xxx[,[yyy1]#xxx1]*</parameter>
+	  <parameter>WINEDEBUG= [yyy]#xxx[,[yyy1]#xxx1]*</parameter>
         </para>
         <itemizedlist>
           <listitem>
@@ -252,7 +252,7 @@
               on all classes. For example:
             </para>
             <programlisting>
---debugmsg +reg,-file
+WINEDEBUG=+reg,-file
             </programlisting>
             <para>
               enables all messages on the <literal>reg</literal>
@@ -269,7 +269,7 @@
               only on the given class. For example:
             </para>
             <programlisting>
---debugmsg trace+reg,warn-file
+WINEDEBUG=trace+reg,warn-file
             </programlisting>
             <para>
               enables trace messages on the <literal>reg</literal>
@@ -283,18 +283,18 @@
               has the  intuitive semantics:
             </para>
             <screen>
-    --debugmsg +all      -- enables all debug messages
-    --debugmsg -all      -- disables all debug messages
-    --debugmsg yyy+all   -- enables debug messages for class yyy on all
+    WINEDEBUG=+all      -- enables all debug messages
+    WINEDEBUG=-all      -- disables all debug messages
+    WINEDEBUG=yyy+all   -- enables debug messages for class yyy on all
                            channels.
-    --debugmsg yyy-all   -- disables debug messages for class yyy on all
+    WINEDEBUG=yyy-all   -- disables debug messages for class yyy on all
                            channels.
             </screen>
             <para>
               So, for example:
             </para>
             <screen>
-    --debugmsg warn-all  -- disables all warning messages.
+    WINEDEBUG=warn-all  -- disables all warning messages.
             </screen>
           </listitem>
         </itemizedlist>
diff --git a/documentation/implementation.sgml b/documentation/implementation.sgml
index 2a1d0da..4cdbd0a 100644
--- a/documentation/implementation.sgml
+++ b/documentation/implementation.sgml
@@ -122,7 +122,7 @@
 it works. If it fails to detect your table, try running
 </para>
 <screen>
-wine --debugmsg +key,+keyboard >& key.log
+WINEDEBUG=+key,+keyboard wine > key.log 2>&1
       </screen>
       <para>
         and look in the resulting <filename>key.log</filename> file to
diff --git a/documentation/opengl.sgml b/documentation/opengl.sgml
index b1e0918..dbf8e88 100644
--- a/documentation/opengl.sgml
+++ b/documentation/opengl.sgml
@@ -306,7 +306,7 @@
         </para>
 
         <para>
-          If you have this, run with <parameter>--debugmsg +opengl</parameter>
+          If you have this, run with <parameter>WINEDEBUG=+opengl</parameter>
           and send me <email>lionel.ulmer@free.fr</email> the TRACE.
         </para>
       </sect2>
diff --git a/documentation/winelib-bindlls.sgml b/documentation/winelib-bindlls.sgml
index c86df09..f8a61b3 100644
--- a/documentation/winelib-bindlls.sgml
+++ b/documentation/winelib-bindlls.sgml
@@ -267,8 +267,8 @@
       </para>
       <para>
         Once you have done this you should be using the Linux Shared Object
-        successfully.  If you have problems then use the --debugmsg +module
-        options to wine to see what is actually happening.
+        successfully.  If you have problems then set the WINEDEBUG=+module
+        environment variable before running wine to see what is actually happening.
       </para>
     </sect1>