예제 #1
0
 public virtual int OpenOutput(string name, out IVsOutput output)
 {
     CCITracing.TraceCall();
     output = null;
     return(VSConstants.E_NOTIMPL);
 }
예제 #2
0
        /// <summary>
        /// Called by the vs shell to start debugging (managed or unmanaged).
        /// Override this method to support other debug engines.
        /// </summary>
        /// <param name="grfLaunch">A flag that determines the conditions under which to start the debugger. For valid grfLaunch values, see __VSDBGLAUNCHFLAGS</param>
        /// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code</returns>
        public virtual int DebugLaunch(uint grfLaunch)
        {
            CCITracing.TraceCall();

            try
            {
                VsDebugTargetInfo info = new VsDebugTargetInfo();
                info.cbSize = (uint)Marshal.SizeOf(info);
                info.dlo    = Microsoft.VisualStudio.Shell.Interop.DEBUG_LAUNCH_OPERATION.DLO_CreateProcess;

                // On first call, reset the cache, following calls will use the cached values
                string property = GetConfigurationProperty("StartProgram", true);
                if (string.IsNullOrEmpty(property))
                {
                    info.bstrExe = this.project.GetOutputAssembly(this.ConfigName);
                }
                else
                {
                    info.bstrExe = property;
                }

                property = GetConfigurationProperty("WorkingDirectory", false);
                if (string.IsNullOrEmpty(property))
                {
                    info.bstrCurDir = Path.GetDirectoryName(info.bstrExe);
                }
                else
                {
                    info.bstrCurDir = property;
                }

                property = GetConfigurationProperty("CmdArgs", false);
                if (!string.IsNullOrEmpty(property))
                {
                    info.bstrArg = property;
                }

                property = GetConfigurationProperty("RemoteDebugMachine", false);
                if (property != null && property.Length > 0)
                {
                    info.bstrRemoteMachine = property;
                }

                info.fSendStdoutToOutputWindow = 0;

                property = GetConfigurationProperty("EnableUnmanagedDebugging", false);
                if (property != null && string.Compare(property, "true", StringComparison.OrdinalIgnoreCase) == 0)
                {
                    //Set the unmanged debugger
                    //TODO change to vsconstant when it is available in VsConstants (guidNativeOnlyEng was the old name, maybe it has got a new name)
                    info.clsidCustom = new Guid("{3B476D35-A401-11D2-AAD4-00C04F990171}");
                }
                else
                {
                    //Set the managed debugger
                    info.clsidCustom = VSConstants.CLSID_ComPlusOnlyDebugEngine;
                }
                info.grfLaunch = grfLaunch;
                VsShellUtilities.LaunchDebugger(this.project.Site, info);
            }
            catch (Exception e)
            {
                Trace.WriteLine("Exception : " + e.Message);

                return(Marshal.GetHRForException(e));
            }

            return(VSConstants.S_OK);
        }
예제 #3
0
 public virtual int get_RootURL(out string root)
 {
     CCITracing.TraceCall();
     root = null;
     return(VSConstants.S_OK);
 }
예제 #4
0
 public virtual int get_TargetCodePage(out uint target)
 {
     CCITracing.TraceCall();
     target = (uint)System.Text.Encoding.Default.CodePage;
     return(VSConstants.S_OK);
 }
예제 #5
0
 public virtual int get_IsSpecifyingOutputSupported(out int f)
 {
     CCITracing.TraceCall();
     f = 1;
     return(VSConstants.S_OK);
 }
예제 #6
0
 public virtual int get_Platform(out Guid platform)
 {
     CCITracing.TraceCall();
     platform = Guid.Empty;
     return(VSConstants.E_NOTIMPL);
 }
예제 #7
0
 public virtual int get_IsPackaged(out int pkgd)
 {
     CCITracing.TraceCall();
     pkgd = 0;
     return(VSConstants.S_OK);
 }
예제 #8
0
 public virtual int EnumOutputs(out IVsEnumOutputs eo)
 {
     CCITracing.TraceCall();
     eo = null;
     return(VSConstants.E_NOTIMPL);
 }
예제 #9
0
        public virtual int Wait(uint ms, int fTickWhenMessageQNotEmpty)
        {
            CCITracing.TraceCall();

            return(VSConstants.E_NOTIMPL);
        }
예제 #10
0
        public virtual int Stop(int fsync)
        {
            CCITracing.TraceCall();

            return(VSConstants.S_OK);
        }
예제 #11
0
        public virtual int StartUpToDateCheck(IVsOutputWindowPane pane, uint options)
        {
            CCITracing.TraceCall();

            return(VSConstants.E_NOTIMPL);
        }