diff --git a/data/resources/StringResources.resx b/data/resources/StringResources.resx
index cc81fab295..1ebec213b4 100644
--- a/data/resources/StringResources.resx
+++ b/data/resources/StringResources.resx
@@ -3782,6 +3782,9 @@ You can also choose to store the setting in the .user-file instead of the projec
Application already exists.
+
+ Debugger was unable to attach to process.
+
Code Covered
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs b/src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs
index bbccdfee99..83818dff69 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs
@@ -153,14 +153,14 @@ namespace ICSharpCode.SharpDevelop.Services
}
var project = ProjectService.CurrentProject as CompilableProject;
-
+ System.Diagnostics.Process localProcess = null;
if (project != null) {
// start browser
if (project.StartAction == StartAction.StartURL)
- System.Diagnostics.Process.Start(processStartInfo.FileName);
+ localProcess = System.Diagnostics.Process.Start(processStartInfo.FileName);
else
if (!string.IsNullOrEmpty(debugData.Data.ProjectUrl) && debugData.Data.WebServer == WebServer.IIS)
- System.Diagnostics.Process.Start("iexplore.exe", debugData.Data.ProjectUrl);
+ localProcess = System.Diagnostics.Process.Start(debugData.Data.ProjectUrl);
}
// try debug IIS WP
@@ -177,8 +177,16 @@ namespace ICSharpCode.SharpDevelop.Services
}
if (!attached) {
- string format = ResourceService.GetString("ICSharpCode.WepProjectOptionsPanel.NoIISWP");
- MessageService.ShowMessage(string.Format(format, processName));
+ if(debugData.Data.WebServer == WebServer.IIS) {
+ string format = ResourceService.GetString("ICSharpCode.WepProjectOptionsPanel.NoIISWP");
+ MessageService.ShowMessage(string.Format(format, processName));
+ }
+ else {
+ Attach(localProcess);
+ if (!attached) {
+ MessageService.ShowMessage(ResourceService.GetString("ICSharpCode.WepProjectOptionsPanel.UnableToAttach"));
+ }
+ }
}
}
else {
@@ -241,6 +249,9 @@ namespace ICSharpCode.SharpDevelop.Services
public void Attach(System.Diagnostics.Process existingProcess)
{
+ if (existingProcess == null)
+ return;
+
if (IsDebugging) {
MessageService.ShowMessage(errorDebugging);
return;
diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.cs b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.cs
index f2678b2880..071bc4e3fb 100644
--- a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.cs
+++ b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/DebugOptions.cs
@@ -62,8 +62,9 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
ElementHost host = new ElementHost();
host.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
host.Height = 160;
+ host.Width = 550;
host.Top = 240;
- host.Left = 8;
+ host.Left = 8;
host.Child = new WebProjectOptionsPanel(this);
Controls.Add(host);
}
diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/WebProjectOptions/WebProjectOptionsPanel.xaml b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/WebProjectOptions/WebProjectOptionsPanel.xaml
index 479d9929c6..eabce7e8e1 100644
--- a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/WebProjectOptions/WebProjectOptionsPanel.xaml
+++ b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/WebProjectOptions/WebProjectOptionsPanel.xaml
@@ -1,66 +1,63 @@
-
-
+>
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+ Text="{core:Localize ICSharpCode.WepProjectOptionsPanel.ProjectUrl}" />
+
+
+
+
-
-
+
+
\ No newline at end of file
diff --git a/src/Main/Base/Project/Src/Project/AbstractProject.cs b/src/Main/Base/Project/Src/Project/AbstractProject.cs
index bf93a63d68..6b5aa7390e 100644
--- a/src/Main/Base/Project/Src/Project/AbstractProject.cs
+++ b/src/Main/Base/Project/Src/Project/AbstractProject.cs
@@ -382,7 +382,7 @@ namespace ICSharpCode.SharpDevelop.Project
MessageService.ShowError(ex.Message);
return;
}
- if (withDebugging && (!FileUtility.IsUrl(psi.FileName) || IsWebProject)) {
+ if (withDebugging) {
DebuggerService.CurrentDebugger.Start(psi);
} else {
DebuggerService.CurrentDebugger.StartWithoutDebugging(psi);