I am attempting to add a custom debug launcher to my project system but I am not sure if the layout that I want for it in the UI is possible, and I am struggling to understand how the rule file ties up with the display.
My goal is for the "debug button dropdown" in VS to list some current local IIS websites. I have implemented an IDynamicEnumValuesGenerator to provide this list by interrogating IIS. It might return 0 items if the developer hasn't yet installed a third party website, or it might return multiple items if they have installed many instances of the website.
I'd like for developer to select an appropriate one of these "sites" from the dropdown (next to the "Play" symbol) to make it the active debug target. This is similar to how a debugger works when you are using an emulator and there are multiple possible images that you can debug with - i.e you have to select one. Once they have selected a site from the dropdown, they'd then just click the debug button (Play) as normal and at that point, I'd then like to handle deployment of relevent build outputs (from the projects) to that website, before ultimately "attaching" the debugger to that process.
My issue is as follows: given my rule file:
<?xml version="1.0" encoding="utf-8"?><!--Copyright, Microsoft Corporation, All rights reserved.--><!--TODO: Update the following files with the specified content
*BuildSystem\DeployedBuildSystem\CustomProject.Default.props* - update the value of the existing DebuggerFlavor element to use the new debugger
<PropertyGroup><DebuggerFlavor>DnnDebugger</DebuggerFlavor></PropertyGroup>
--><Rule
Name="DnnDebugger"
DisplayName="Local Dnn Website"
PageTemplate="debugger"
Description="DnnDebugger Debugger options"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/build/2009/properties"><Rule.DataSource><DataSource Persistence="UserFileWithXamlDefaults" /></Rule.DataSource><DynamicEnumProperty Name="DotNetNukeSiteId" DisplayName="Debug Target" EnumProvider="DnnWebsiteValuesProvider"
Description="Specifies the dotnetnuke site to for debugging. If no sites are installed on your IIS, please use 'Download Dnn Website...' in debug target dropdown"
/><StringProperty Name="DnnDebuggerCommand" DisplayName="Command"
Default="$(TargetPath)"
Description="The debug command to execute."><StringProperty.ValueEditors><!--<ValueEditor EditorType="DefaultFindFullPathPropertyEditor" DisplayName="<regsvr32.exe>"><ValueEditor.Metadata><NameValuePair Name="Exename" Value="regsvr32.exe" /></ValueEditor.Metadata></ValueEditor>--><ValueEditor EditorType="DefaultStringPropertyEditor" DisplayName="<Edit...>"/><ValueEditor EditorType="DefaultFilePropertyEditor" DisplayName="<Browse...>"><ValueEditor.Metadata><NameValuePair Name="Filters" Value="Executables (*.exe)|*.exe" /></ValueEditor.Metadata></ValueEditor></StringProperty.ValueEditors></StringProperty><StringProperty Name="DnnDebuggerCommandArguments" DisplayName="Command Arguments"
Description="The command line arguments to pass to the application."><Argument Property="DnnDebuggerCommand" /></StringProperty><StringProperty Name="DnnDebuggerWorkingDirectory" DisplayName="Working Directory"
Default="$(MSBuildProjectDirectory)"
Description="The application's working directory. By default, the directory containing the project file."
Subtype="folder"/><BoolProperty Name="DnnDebuggerDebuggerAttach" DisplayName="Attach"
Default="True"
Description="Specifies whether the debugger should attempt to attach to an existing process when debugging starts." /></Rule>All this seems to do is cause the debugger UI in VS to list my debugger as an item in it's drop down (along side the windows local and remote debuggers). This is not what I want, as I want each IIS website to be listed here, and I don't want the windows local and remote debuggers to be listed at all. I want to be in control of this list, but it looks like I presently am not.
So my thoughts are:
1. Do I need to create a custom PageTemplate somehow, and then use that in my debugger's rule file? If that will let me control the UI - is there any docs for how to create a PageTemplate or is the "debugger" page template source code available for an example?
PageTemplate="mydebugger"
2. Do I need to scrap the debugger entirely, and implement some sort of custom toolbox window that sits in the same place? If so how do I remove the debugger entirely from my CPS project type, and is there any docs for creating a tool window that could help me?
If anyone can give me a nudge in the right direction with this I would be really grateful.
Many Thanks
Darrell