c++ - Quickly enter command-line parameters for Visual Studio debugging? -


After

I want to change my command line argument and then debug my execution.

Studio UI with default view, it takes me many deceptive mouse and keyboard functions:

Project ... Right click ... Configuration Properties .. Debugging ... Command Arguments ... Type Args ... Enter ... F5

Does this common action work for other common tasks The way to make it easy, for example, goes to search for all the files for a pattern:

CNTL + SHIFT + F ... type lost Pattern ... the ENTER

For example, a way to create a custom edit box to the debug command line allowing quick access to arguments? Or is a simple "debug dialog" a way to pop up a key binding where RG can be recorded and debugging starts directly? Like

ALT + F5 ... args type ... ENTER

using I and C ++ Visual Studio 2010 Express Thanks!

macro should help the bottom Open "Tools-> Makrojh-> Macro Explorer", the new module Create, edit it, and copy-paste code below. It is not necessary command UI good SetCommandArgsProperty, but it will also work works (VS 2005, I hope that VS in 2010)

  • Search startup project
  • Select the active configuration and find the property name "CommandArguments"
  • is
  • If the correct choice is done, property update

      sub Create edit box with current value in SetCommandArgsProperty (with) Dynamic newVal object newVal = present (GetCommandArgsPropertyValue ()) End Sub Commemoration OOM as the current (ByVal defaultText string) dimmed frames the New System.Windows.Forms.Form as new BTN then typeof newVal string is then SetCommandArgsProperty (newVal) end, so as to System.Windows.Forms .Button dim edit New System.Windows.Forms.TextBox edit.Text = defaultText edit.Width = 100 btn.Text = "as well as" btn.DialogResult = System.Windows.Forms.DialogResult.OK frm. Text = "input command line properties" frm.Controls.Add (btn) btn.Dock = System.Windows.Forms.DockStyle.Bottom frm.Controls.Add (edit) edit.Dock = System.Windows.Forms.DockStyle. Top Frm.Height = 80 frm.Width = 3 00 if frm.ShowDialog () = System.Windows.Forms.DialogResult.OK comeback edit.Text finally return System.DBNull.Value termination function GetCommandArgsProperty () EnvDTE.Property dim solution dim project configuration dim properties as SolutionBuild dim str string dim cm ConfigurationManager dim config as in as dim sb dim Prop EnvDTE.Property solution = DTE.Solut Ion sb = solution.SolutionBuild sb.StartupProjects for each str in the project as far as as possible = solution.Item (STR) = project.ConfigurationManager config = cm for each prop. In the ActiveConfiguration property = config.Properties property, prop.Name = "CommandArguments" then return the PROP end if the next Next End function function GetCommandArgsPropertyValue () Return GetCommandArgsProperty (). PriceCommentArgsProperty (ByVal Value as String) GetCommandArgsProperty (). Value = Price End Sub      

Comments