Skip to content

Commit 53bc735

Browse files
author
David Karlaš
committed
Give more specific name to processes than "mono"
1 parent fa6b1db commit 53bc735

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Mono.Debugging.Soft/SoftDebuggerSession.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ protected override void OnRun (DebuggerStartInfo startInfo)
133133

134134
var dsi = (SoftDebuggerStartInfo) startInfo;
135135
if (dsi.StartArgs is SoftDebuggerLaunchArgs) {
136+
remoteProcessName = Path.GetFileNameWithoutExtension (dsi.Command);
136137
StartLaunching (dsi);
137138
} else if (dsi.StartArgs is SoftDebuggerConnectArgs) {
138139
StartConnecting (dsi);
@@ -714,11 +715,13 @@ protected override void OnFinish ()
714715
protected override ProcessInfo[] OnGetProcesses ()
715716
{
716717
if (procs == null) {
717-
if (remoteProcessName != null || vm.TargetProcess == null) {
718+
if (vm == null)//process didn't start yet
719+
return new ProcessInfo [0];
720+
if (vm.TargetProcess == null) {
718721
procs = new [] { new ProcessInfo (0, remoteProcessName ?? "mono") };
719722
} else {
720723
try {
721-
procs = new [] { new ProcessInfo (vm.TargetProcess.Id, vm.TargetProcess.ProcessName) };
724+
procs = new [] { new ProcessInfo (vm.TargetProcess.Id, remoteProcessName ?? vm.TargetProcess.ProcessName) };
722725
} catch (Exception ex) {
723726
if (!loggedSymlinkedRuntimesBug) {
724727
loggedSymlinkedRuntimesBug = true;

0 commit comments

Comments
 (0)