Problems with DebugLauncher Layout RRS feed

  • Question

  • 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
    	DisplayName="Local Dnn Website"
    	Description="DnnDebugger Debugger options"
            <DataSource Persistence="UserFileWithXamlDefaults" />
        <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"
                    Description="The debug command to execute.">
                <!--<ValueEditor EditorType="DefaultFindFullPathPropertyEditor" DisplayName="&lt;regsvr32.exe&gt;">
                        <NameValuePair Name="Exename" Value="regsvr32.exe" />
                <ValueEditor EditorType="DefaultStringPropertyEditor" DisplayName="&lt;Edit...&gt;"/>
                <ValueEditor EditorType="DefaultFilePropertyEditor" DisplayName="&lt;Browse...&gt;">
                        <NameValuePair Name="Filters" Value="Executables (*.exe)|*.exe" />
        <StringProperty Name="DnnDebuggerCommandArguments" DisplayName="Command Arguments"
                    Description="The command line arguments to pass to the application.">
            <Argument Property="DnnDebuggerCommand" />
        <StringProperty Name="DnnDebuggerWorkingDirectory" DisplayName="Working Directory"
                    Description="The application's working directory. By default, the directory containing the project file."
        <BoolProperty Name="DnnDebuggerDebuggerAttach" DisplayName="Attach"
                    Description="Specifies whether the debugger should attempt to attach to an existing process when debugging starts." />

    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?


    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


    • Edited by Darrell Tunnell Tuesday, December 29, 2015 10:31 PM tidied up and clarified
    Tuesday, December 29, 2015 9:13 PM


All replies

  • Hi Darrell,

    >>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.

    I think you should add sub menus to Debug->Start Debugging. Then, it will show dropdown in ToolBar. Reference article shows us how to add sub menu to a menu.

    Another way, you could add a dropdown next to Debug/Start button. There is a similar project with source code on the web. Link below is for your reference.


    Source code:

    Best Regards,
    Li Wang

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, December 30, 2015 6:39 AM
  • Thank you Li,

    I am trying your first suggestion at present, which is to add sub menu's to the Debug --> Start Debugging menu. I have read the reference article, however i'm not sure how I get the GUID and Id for the parent menu (Debug --> Start Debugging). I'll raise that as a seperate question though rather than address that here.

    Wednesday, December 30, 2015 3:45 PM
  • Created question here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/372dbe5f-fbdc-4e12-b22d-7b1c578dc03a/menu-guid-and-id-for-debugstart-debugging-menu?forum=vsx
    Wednesday, December 30, 2015 3:56 PM