File tree Expand file tree Collapse file tree
src/CodingWithCalvin.LaunchyBar Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,6 +72,16 @@ public static LaunchyBarConfiguration CreateDefault()
7272 Order = 3
7373 } ,
7474 new ( )
75+ {
76+ Id = "start-without-debugging" ,
77+ Name = "Start Without Debugging" ,
78+ IconPath = "KnownMonikers.RunOutline" ,
79+ Type = LaunchItemType . VsCommand ,
80+ Target = "Debug.StartWithoutDebugging" ,
81+ Position = LaunchItemPosition . Top ,
82+ Order = 4
83+ } ,
84+ new ( )
7585 {
7686 Id = "terminal" ,
7787 Name = "Terminal" ,
Original file line number Diff line number Diff line change @@ -61,6 +61,15 @@ private void UpdateDebugIcon(bool isDebugging)
6161 debugItem . IconPath = isDebugging ? "KnownMonikers.Stop" : "KnownMonikers.Run" ;
6262 debugItem . Name = isDebugging ? "Stop Debugging" : "Start Debugging" ;
6363 }
64+
65+ var startWithoutDebuggingItem = _configurationService . Configuration . Items
66+ . FirstOrDefault ( i => i . Id == "start-without-debugging" || i . Target == "Debug.StartWithoutDebugging" ) ;
67+
68+ if ( startWithoutDebuggingItem != null )
69+ {
70+ startWithoutDebuggingItem . IconPath = isDebugging ? "KnownMonikers.Stop" : "KnownMonikers.RunOutline" ;
71+ startWithoutDebuggingItem . Name = isDebugging ? "Stop Debugging" : "Start Without Debugging" ;
72+ }
6473 }
6574
6675 public void Dispose ( )
Original file line number Diff line number Diff line change @@ -71,9 +71,10 @@ public async Task ExecuteAsync(LaunchItem item)
7171
7272 case LaunchItemType . VsCommand :
7373 // Special handling for debug commands
74- if ( item . Target . Equals ( "Debug.Start" , StringComparison . OrdinalIgnoreCase ) )
74+ if ( item . Target . Equals ( "Debug.Start" , StringComparison . OrdinalIgnoreCase ) ||
75+ item . Target . Equals ( "Debug.StartWithoutDebugging" , StringComparison . OrdinalIgnoreCase ) )
7576 {
76- await ToggleDebugAsync ( ) ;
77+ await ToggleDebugAsync ( item . Target ) ;
7778 }
7879 else
7980 {
@@ -201,14 +202,14 @@ private async Task HideOtherToolWindowsAsync(LaunchItem currentItem)
201202 }
202203 }
203204
204- private async Task ToggleDebugAsync ( )
205+ private async Task ToggleDebugAsync ( string startCommand )
205206 {
206207 await ThreadHelper . JoinableTaskFactory . SwitchToMainThreadAsync ( ) ;
207208
208209 var dte = await _package . GetServiceAsync ( typeof ( DTE ) ) as DTE2 ;
209210 if ( dte == null )
210211 {
211- await VS . Commands . ExecuteAsync ( "Debug.Start" ) ;
212+ await VS . Commands . ExecuteAsync ( startCommand ) ;
212213 return ;
213214 }
214215
@@ -221,8 +222,8 @@ private async Task ToggleDebugAsync()
221222 }
222223 else
223224 {
224- // Not debugging - start
225- await VS . Commands . ExecuteAsync ( "Debug.Start" ) ;
225+ // Not debugging - start with the specified command
226+ await VS . Commands . ExecuteAsync ( startCommand ) ;
226227 }
227228 }
228229
You can’t perform that action at this time.
0 commit comments