diff options
author | Llewellyn Pritchard <xacc.ide@gmail.com> | 2024-02-06 12:43:47 +0200 |
---|---|---|
committer | Llewellyn Pritchard <xacc.ide@gmail.com> | 2024-02-06 12:43:47 +0200 |
commit | 113b61fce17b7952b5294f0b0c2dba09bf60b159 (patch) | |
tree | 5118ba30b5127983f5cd03178ded34de78cc71d4 | |
parent | 7efb2f6aeeea12e5053e8d22e197e033564d9d05 (diff) |
Make sure DEbugger.Break is not called in release builds1.0.338
-rw-r--r-- | IronScheme/IronScheme/Runtime/Control.cs | 4 | ||||
-rw-r--r-- | IronScheme/Microsoft.Scripting/Ast/CodeBlock.cs | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/IronScheme/IronScheme/Runtime/Control.cs b/IronScheme/IronScheme/Runtime/Control.cs index df873491..c2ce6ef5 100644 --- a/IronScheme/IronScheme/Runtime/Control.cs +++ b/IronScheme/IronScheme/Runtime/Control.cs @@ -35,8 +35,10 @@ namespace IronScheme.Runtime if (args.Length > 1)
{
Expression arg = Ast.ConvertHelper(args[args.Length - 1], typeof(object));
-
+
+#if DEBUG
if (arg.IsConstant(null)) Debugger.Break();
+#endif
for (int i = args.Length - 2; i > 0; i--)
{
diff --git a/IronScheme/Microsoft.Scripting/Ast/CodeBlock.cs b/IronScheme/Microsoft.Scripting/Ast/CodeBlock.cs index 90cc7be1..8b956248 100644 --- a/IronScheme/Microsoft.Scripting/Ast/CodeBlock.cs +++ b/IronScheme/Microsoft.Scripting/Ast/CodeBlock.cs @@ -507,7 +507,9 @@ namespace Microsoft.Scripting.Ast { foreach (VariableReference r in References) { if (r.Variable.Block == null) { +#if DEBUG Debugger.Break(); +#endif } r.CreateSlot(cg); Debug.Assert(r.Slot != null); |