Connector/Net Visual Studio Integration
1841
A copy of the original version of each instrumented routine (the version without
instrumentation) is stored in the
AppData\Roaming\MySqlDebuggerCache
folder for the current Windows user (the path returned by calling
System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
in .NET, plus appending
MySqlDebuggerCache
. There is one file for each instrumented routine,
named
routine_name.mysql
. For example, in Windows 7, for a user named
fergs
, the path is
C:
\Users\fergs\AppData\Roaming\MySqlDebuggerCache
.
Two threads are used, one for the debugger and one for the routine being debugged. The threads run
in strict alternation, switching between the debugger and the routine as each statement is executed in
the stored routine.
Basic Debugging Operations
The debugger has the same look and feel as the standard Visual Studio debuggers for C#, VB.NET or
C++. In particular, the following are true:
Locals and Watches
• To show the Locals tab, choose the menu item Debug -> Windows -> Locals.
The Locals tab lists all the variables available in the current scope: variables defined with
DECLARE
at any point in the routine, argument parameters, and session variables that are referenced.
• If the last step operation changes the value of a local, its value will be highlighted in red (until another
statement is executed or stepped.
• You can change the value of any local.
• To show the Watch tab, choose the menu item Debug -> Windows -> Watch.
To define a watch, type any valid MySQL expression, optionally including function calls. If the watch
evaluation makes sense in the current context (current stack frame), it will show its value, otherwise
it will show an error message in the same row the watch was defined.
• When debugging a trigger, in addition to any locals declared or session variables referenced, the
new and old object (when applicable) will be listed. For example in a trigger for
INSERT
, for a table
defined like:
create table t1( id int, myname varchar( 50 ));
the locals will list the extra variables
new.id
and
new.myname
. For an
UPDATE
trigger, you will also
get the extra variables
old.id
and
old.myname
. These variables from the new and old objects can
be manipulated the same way as any ordinary local variable.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...