diff --git a/Shared/Audio/DebugEntry.wav b/Shared/Audio/DebugEntry.wav
new file mode 100644
index 0000000..2e22a89
Binary files /dev/null and b/Shared/Audio/DebugEntry.wav differ
diff --git a/djfoxer.VisualStudio.MakeTheSound.Legacy16/djfoxer.VisualStudio.MakeTheSound.Legacy16.csproj b/djfoxer.VisualStudio.MakeTheSound.Legacy16/djfoxer.VisualStudio.MakeTheSound.Legacy16.csproj
index b664ad5..d6222be 100644
--- a/djfoxer.VisualStudio.MakeTheSound.Legacy16/djfoxer.VisualStudio.MakeTheSound.Legacy16.csproj
+++ b/djfoxer.VisualStudio.MakeTheSound.Legacy16/djfoxer.VisualStudio.MakeTheSound.Legacy16.csproj
@@ -125,6 +125,11 @@
Always
true
+
+ Audio\DebugEntry.wav
+ true
+ Always
+
Audio\Exception.wav
Always
diff --git a/djfoxer.VisualStudio.MakeTheSound.Shared/Events/IDEEventType.cs b/djfoxer.VisualStudio.MakeTheSound.Shared/Events/IDEEventType.cs
index c468837..f9e4aeb 100644
--- a/djfoxer.VisualStudio.MakeTheSound.Shared/Events/IDEEventType.cs
+++ b/djfoxer.VisualStudio.MakeTheSound.Shared/Events/IDEEventType.cs
@@ -29,5 +29,8 @@ public enum IDEEventType
[IDEEventSource(IDEEventSourceType.DteEvent)]
[Name(Consts.OptionsEnableAudioExceptionDescription)]
Exception = 7,
+ [IDEEventSource(IDEEventSourceType.DteEvent)]
+ [Name(Consts.OptionsEnableAudioEntryDebugModeDescription)]
+ DebugEntry = 8,
}
}
diff --git a/djfoxer.VisualStudio.MakeTheSound.Shared/Helper/Consts.cs b/djfoxer.VisualStudio.MakeTheSound.Shared/Helper/Consts.cs
index e0570a4..9c872cf 100644
--- a/djfoxer.VisualStudio.MakeTheSound.Shared/Helper/Consts.cs
+++ b/djfoxer.VisualStudio.MakeTheSound.Shared/Helper/Consts.cs
@@ -27,5 +27,8 @@ public static class Consts
public const string OptionsEnableAudioFileSaveAllText = "Enable save all files";
public const string OptionsEnableAudioFileSaveAllDescription = "Save all files sound effect";
+
+ public const string OptionsEnableAudioEntryDebugMode = "Enable entry debug mode";
+ public const string OptionsEnableAudioEntryDebugModeDescription = "Entry debug mode";
}
}
diff --git a/djfoxer.VisualStudio.MakeTheSound.Shared/MakeTheSoundEventCatcher.cs b/djfoxer.VisualStudio.MakeTheSound.Shared/MakeTheSoundEventCatcher.cs
index d441934..f2f66d5 100644
--- a/djfoxer.VisualStudio.MakeTheSound.Shared/MakeTheSoundEventCatcher.cs
+++ b/djfoxer.VisualStudio.MakeTheSound.Shared/MakeTheSoundEventCatcher.cs
@@ -8,7 +8,9 @@
using Microsoft.VisualStudio.Shell;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
+using System.IO.Packaging;
using System.Linq;
+using System.Management.Instrumentation;
using System.Reflection;
using System.Threading.Tasks;
@@ -49,6 +51,7 @@ public async Task InitAsync(AsyncPackage package, Opti
_dte = (DTE2)await _package.GetServiceAsync(typeof(DTE));
Assumes.Present(_dte);
+
_events = _dte.Events as Events2;
_buildEvents = _events.BuildEvents;
@@ -60,6 +63,7 @@ public async Task InitAsync(AsyncPackage package, Opti
await AddActionAsync(IDEEventType.Building);
await AddActionAsync(IDEEventType.Breakepoint);
await AddActionAsync(IDEEventType.Exception);
+ await AddActionAsync(IDEEventType.DebugEntry);
return this;
}
@@ -82,16 +86,27 @@ private async System.Threading.Tasks.Task AddActionAsync(IDEEventType iDEEventTy
}
else if (iDEEventType == IDEEventType.Breakepoint)
{
- _debuggerEvents.OnEnterBreakMode += DebuggerEvents_OnEnterBreakMode; ;
+ _debuggerEvents.OnEnterBreakMode += DebuggerEvents_OnEnterBreakMode;
+ }
+ else if (iDEEventType == IDEEventType.DebugEntry)
+ {
+ _debuggerEvents.OnEnterRunMode += _debuggerEvents_OnEnterRunMode;
}
else if (iDEEventType == IDEEventType.Exception)
{
_debuggerEvents.OnExceptionNotHandled += DebuggerEvents_OnExceptionNotHandled;
- _debuggerEvents.OnExceptionThrown += DebuggerEvents_OnExceptionThrown; ;
+ _debuggerEvents.OnExceptionThrown += DebuggerEvents_OnExceptionThrown;
}
+
+
}
}
+ private void _debuggerEvents_OnEnterRunMode(dbgEventReason Reason)
+ {
+ SetSoundForSingleEvent(IDEEventType.DebugEntry, false);
+ }
+
private void DebuggerEvents_OnExceptionThrown(string ExceptionType, string Name, int Code, string Description, ref dbgExceptionAction ExceptionAction)
{
SetSoundForSingleEvent(IDEEventType.Exception, false);
diff --git a/djfoxer.VisualStudio.MakeTheSound.Shared/Options/OptionsPage.cs b/djfoxer.VisualStudio.MakeTheSound.Shared/Options/OptionsPage.cs
index e3a4ada..2b8e66f 100644
--- a/djfoxer.VisualStudio.MakeTheSound.Shared/Options/OptionsPage.cs
+++ b/djfoxer.VisualStudio.MakeTheSound.Shared/Options/OptionsPage.cs
@@ -59,6 +59,21 @@ public bool EnableAudioBreakpoint
}
}
+ [Category(Consts.OptionSubmenu)]
+ [DisplayName(Consts.OptionsEnableAudioEntryDebugMode)]
+ [Description(Consts.OptionsEnableAudioEntryDebugModeDescription)]
+ public bool EnableAudioEntryDebugMode
+ {
+ get
+ {
+ return _eventTypeConfig[IDEEventType.DebugEntry].IsEnabled;
+ }
+ set
+ {
+ _eventTypeConfig[IDEEventType.DebugEntry].IsEnabled = value;
+ }
+ }
+
[Category(Consts.OptionSubmenu)]
[DisplayName(Consts.OptionsEnableAudioBuildFailsText)]
[Description(Consts.OptionsEnableAudioBuildFailsDescription)]
diff --git a/djfoxer.VisualStudio.MakeTheSound/djfoxer.VisualStudio.MakeTheSound.csproj b/djfoxer.VisualStudio.MakeTheSound/djfoxer.VisualStudio.MakeTheSound.csproj
index 46b30dc..e30537b 100644
--- a/djfoxer.VisualStudio.MakeTheSound/djfoxer.VisualStudio.MakeTheSound.csproj
+++ b/djfoxer.VisualStudio.MakeTheSound/djfoxer.VisualStudio.MakeTheSound.csproj
@@ -85,6 +85,11 @@
Always
true
+
+ Audio\DebugEntry.wav
+ true
+ Always
+
Audio\Exception.wav
Always