Added some [DebuggerNonUserCode] modifiers to functions that throw EventAbortException() to ease debugging on Visual Studio

avinationmerge
CasperW 2009-11-23 16:02:05 +01:00
parent c3d4b66953
commit 889ce36afa
5 changed files with 15 additions and 1 deletions

View File

@ -28,6 +28,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics; //for [DebuggerNonUserCode]
using System.Runtime.Remoting.Lifetime;
using System.Text;
using System.Threading;
@ -151,6 +152,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
get { return m_ScriptEngine.World; }
}
[DebuggerNonUserCode]
public void state(string newState)
{
m_ScriptEngine.SetState(m_itemID, newState);
@ -160,6 +162,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
/// Reset the named script. The script must be present
/// in the same prim.
/// </summary>
[DebuggerNonUserCode]
public void llResetScript()
{
m_host.AddScriptLPS(1);
@ -3755,6 +3758,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ScriptSleep(3000);
}
[DebuggerNonUserCode]
public void llRemoveInventory(string name)
{
m_host.AddScriptLPS(1);

View File

@ -27,6 +27,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics; //for [DebuggerNonUserCode]
using System.Reflection;
using System.Runtime.Remoting.Lifetime;
using OpenSim.Region.ScriptEngine.Shared;
@ -131,6 +132,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
return (eventFlags);
}
[DebuggerNonUserCode]
public void ExecuteEvent(string state, string FunctionName, object[] args)
{
// IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory.

View File

@ -33,6 +33,7 @@ using System.Threading;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics; //for [DebuggerNonUserCode]
using OpenSim.Region.ScriptEngine.Interfaces;
using OpenSim.Region.ScriptEngine.Shared;
using OpenSim.Region.ScriptEngine.Shared.Api.Runtime;
@ -90,6 +91,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
return (int)m_Executor.GetStateEventFlags(state);
}
[DebuggerNonUserCode]
public void ExecuteEvent(string state, string FunctionName, object[] args)
{
m_Executor.ExecuteEvent(state, FunctionName, args);

View File

@ -27,6 +27,7 @@
using System;
using System.IO;
using System.Diagnostics; //for [DebuggerNonUserCode]
using System.Runtime.Remoting;
using System.Runtime.Remoting.Lifetime;
using System.Threading;
@ -544,6 +545,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
return true;
}
[DebuggerNonUserCode] //Prevents the debugger from farting in this function
public void SetState(string state)
{
if (state == State)
@ -555,7 +557,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
new DetectParams[0]));
PostEvent(new EventParams("state_entry", new Object[0],
new DetectParams[0]));
throw new EventAbortException();
}
@ -824,6 +826,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
new Object[0], new DetectParams[0]));
}
[DebuggerNonUserCode] //Stops the VS debugger from farting in this function
public void ApiResetScript()
{
// bool running = Running;

View File

@ -30,6 +30,7 @@ using System.IO;
using System.Threading;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics; //for [DebuggerNonUserCode]
using System.Security;
using System.Security.Policy;
using System.Reflection;
@ -1119,6 +1120,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
return false;
}
[DebuggerNonUserCode]
public void ApiResetScript(UUID itemID)
{
IScriptInstance instance = GetInstance(itemID);
@ -1170,6 +1172,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
return UUID.Zero;
}
[DebuggerNonUserCode]
public void SetState(UUID itemID, string newState)
{
IScriptInstance instance = GetInstance(itemID);