Skip to content

Commit 37635b6

Browse files
Bugfix: Executable name comparison needs to be case independent, don't launch 2nd process.
1 parent adfcbc8 commit 37635b6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: scriptStarter/ScriptHost.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public static void ScriptServer_ConnectDebugger(CodeType codetype = CodeType.Man
167167
for( int i = 0; i < exeNames.Length; i++)
168168
{
169169
var process = processes[i];
170-
if (exeNames[i] == hostExePath)
170+
if (exeNames[i].ToLower() == hostExePath.ToLower())
171171
{
172172
// No need to attach if debugging multiple processes
173173
if (dte != null && dte.Debugger.DebuggedProcesses.Count <= 1)
@@ -182,6 +182,10 @@ public static void ScriptServer_ConnectDebugger(CodeType codetype = CodeType.Man
182182
if (bAttached)
183183
break;
184184

185+
// Don't launch second process
186+
if (iTry == 1)
187+
break;
188+
185189
ProcessStartInfo procStartInfo = new ProcessStartInfo();
186190
procStartInfo.Arguments = "-Embedding " + additionCommandLineArguments;
187191
procStartInfo.CreateNoWindow = true;

0 commit comments

Comments
 (0)