System.Data.SQLite
Check-in [2bed4a9b30]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Since the debugger handling in MaybeBreakIntoDebugger is opt-in, move it before the check for the 'No_PreLoadSQLite' configuration setting.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2bed4a9b30e4060855076fbd9093eee59dd9753f
User & Date: mistachkin 2017-11-01 01:15:51
Context
2017-11-01
12:59
In the design-time components installer, fix registry key name in GetAssemblyFoldersKeyName broken by check-in [7529b275e1]. check-in: 5010e3dca4 user: mistachkin tags: trunk
01:15
Since the debugger handling in MaybeBreakIntoDebugger is opt-in, move it before the check for the 'No_PreLoadSQLite' configuration setting. check-in: 2bed4a9b30 user: mistachkin tags: trunk
01:00
Adjust comment wording. check-in: b7307ff8d3 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to System.Data.SQLite/UnsafeNativeMethods.cs.

   335    335         #region Internal Methods
   336    336         /// <summary>
   337    337         /// If the "PreLoadSQLite_BreakIntoDebugger" configuration setting is
   338    338         /// present (e.g. via the environment), give the interactive user an
   339    339         /// opportunity to attach a debugger to the current process; otherwise,
   340    340         /// do nothing.
   341    341         /// </summary>
   342         -      private static void MaybeBreakIntoDebugger()
          342  +      internal static void MaybeBreakIntoDebugger()
   343    343         {
   344    344             lock (staticSyncRoot)
   345    345             {
   346    346                 if (debuggerBreak != null)
   347    347                     return;
   348    348             }
   349    349   
................................................................................
  1083   1083         /////////////////////////////////////////////////////////////////////////
  1084   1084         /// <summary>
  1085   1085         /// Attempts to initialize this class by pre-loading the native SQLite
  1086   1086         /// library for the processor architecture of the current process.
  1087   1087         /// </summary>
  1088   1088         internal static void Initialize()
  1089   1089         {
         1090  +          //
         1091  +          // NOTE: Check if a debugger needs to be attached before doing any
         1092  +          //       real work.
         1093  +          //
         1094  +          HelperMethods.MaybeBreakIntoDebugger();
         1095  +
  1090   1096   #if SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK
  1091   1097   #if PRELOAD_NATIVE_LIBRARY
  1092   1098             //
  1093   1099             // NOTE: If the "No_PreLoadSQLite" environment variable is set (to
  1094         -          //       anything), skip all our special code and simply return.
         1100  +          //       anything), skip all of our special code and simply return.
  1095   1101             //
  1096   1102             if (GetSettingValue("No_PreLoadSQLite", null) != null)
  1097   1103                 return;
  1098   1104   #endif
  1099   1105   #endif
  1100   1106   
  1101         -          //
  1102         -          // NOTE: Check if a debugger needs to be attached before
  1103         -          //       doing any real work.
  1104         -          //
  1105         -          HelperMethods.MaybeBreakIntoDebugger();
  1106         -
  1107   1107             #region Debug Build Only
  1108   1108   #if DEBUG
  1109   1109             //
  1110   1110             // NOTE: Create the lists of statistics that will contain
  1111   1111             //       various counts used in debugging, including the
  1112   1112             //       number of times each setting value has been read.
  1113   1113             //