Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Debug: Start external program with arguments #746

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcioalthmann
Copy link

Hello :)

Trying to debug a program with "start external program" with "Command line arguments" the program no received the arguments.

To start one procress with arguments using ICorDebug the argument parameter needs the application name.

See more at: http://blogs.msdn.com/b/jmstall/archive/2006/07/09/createprocess-conventions.aspx

Ajuste para conseguir depurar uma aplicação iniciando com argumentos na
linha de comando
@mrward
Copy link
Member

mrward commented Feb 20, 2016

Unable to reproduce the problem. Can you provide more details on how exactly you are seeing the problem?

My test was:

  1. Created a C# console app and build it. This will be the external program. This program just loops around the args and writes them to the screen and then runs Console.ReadLine to pause the execution.
  2. Create another C# console app, separate solution, to run the external program.
  3. Open project Properties - Debug.
  4. Select Start external program, browse to console app created in 1) and select the .exe.
  5. Enter some command line arguments into the Start Options - Command line arguments section.
  6. Select Debug - Run or run without debugger.
  7. Command line arguments are passed successfully to the external program

@linquize
Copy link
Contributor

Could you write your commit message in English?

@marcioalthmann
Copy link
Author

Hello @mrward , how are you?

My tests:

1 - Create a class library project
2 - Open Properties - Debug
3 - Select Start external program, browse to a win32 application.
4 - Use this command line: WFL_TESTES@pegasus -run -pu SYSDBA -pp masterkey
5 - Run with debugg or without debugger
6 - The win32 application don´t receive the arguments.

@mrward
Copy link
Member

mrward commented Feb 23, 2016

Still not able to reproduce this with a win32 app. What version of Windows are you using? A 32 bit version?

@marcioalthmann
Copy link
Author

I have a x64 Windows 10. I try again in the 5.1RC and the app don´t receive the arguments. My debug tab.

debug

@mrward
Copy link
Member

mrward commented Feb 23, 2016

I have tried Windows 10 x64 and Windows 7 x64. SharpDevelop 5.1 RC 1 seems to pass the command line arguments to a win32 app and a .NET application successfully with my tests. I am not testing the same app as you, since I do not know what that is, and my arguments are slightly different. I can only use Debug - Run without debugger. The debugger will not debug a win32 executable - it just says that it cannot start the process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants