diff options
author | Matt Ward <matt.ward@microsoft.com> | 2020-01-23 14:28:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-23 14:28:03 +0300 |
commit | a183b8b68f39b83118317ab84829a249d172772d (patch) | |
tree | 6c1e744b24ffc58b4ec95718b5c0e47f10724e7e /main/src/core | |
parent | 6956c908c589e6097aa8aa2a86f83083446385e5 (diff) | |
parent | 322e35b5312260d2cf8cd50e1d01531660a07e5a (diff) |
Merge pull request #9581 from mono/debugger-session-project-mapping
[Debugger] Provide SolutionItem to DebuggerSession mapping
Diffstat (limited to 'main/src/core')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ExecutionCommand.cs | 8 | ||||
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ExecutionCommand.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ExecutionCommand.cs index 3db966161d..93fb1343d4 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ExecutionCommand.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ExecutionCommand.cs @@ -24,7 +24,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -using System; +using MonoDevelop.Projects; namespace MonoDevelop.Core.Execution { @@ -46,5 +46,11 @@ namespace MonoDevelop.Core.Execution /// Execution target. For example, a specific device. /// </summary> public ExecutionTarget Target { get; set; } + + /// <summary> + /// IRunTarget item associated with this execution command. This allows the DebuggerSession to be + /// associated with an IRunTarget (typically a Project). + /// </summary> + public IRunTarget RunTarget { get; set; } } } diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs index 8712a31c23..8c826d0fb2 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs @@ -1505,7 +1505,10 @@ namespace MonoDevelop.Projects public ExecutionCommand CreateExecutionCommand (ConfigurationSelector configSel, DotNetProjectConfiguration configuration, ProjectRunConfiguration runConfiguration) { - return ProjectExtension.OnCreateExecutionCommand (configSel, configuration, runConfiguration); + var command = ProjectExtension.OnCreateExecutionCommand (configSel, configuration, runConfiguration); + if (command != null) + command.RunTarget ??= this; + return command; } internal protected virtual ExecutionCommand OnCreateExecutionCommand (ConfigurationSelector configSel, DotNetProjectConfiguration configuration) |