VOGONS


First post, by ge97aa

User metadata
Rank Newbie
Rank
Newbie

I'm using DOSBox 0.74 with the debugger. I would like to know how to start a program with the debugger active, while still passing command-line arguments to that program.

For example, let's say I want to run a program "program.exe" and pass it the command-line arguments "-arg1" and "-arg2". To run this program normally (without activating the debugger), I would simply type:
program.exe -arg1 -arg2
at the command line.

Now, I can start the program with the debugger active by typing
debug program.exe
at the command line, but this of course passes no command-line arguments to the program.

How would I start the program with the debugger active and still pass my command-line arguments to the program?

I have tried:
debug "program.exe -arg1 -arg2"
but this fails to start the program at all.

I have also tried:
debug program.exe -arg1 -arg2
but this does NOT pass "-arg1" and "-arg2" as command-line arguments to the program (presumably because these are treated as command-line arguments for "debug" rather than for "program.exe").

Is there a (simple) way to do what I'm asking?

Reply 1 of 2, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
ge97aa wrote:

I have also tried:
debug program.exe -arg1 -arg2
but this does NOT pass "-arg1" and "-arg2" as command-line arguments to the program (presumably because these are treated as command-line arguments for "debug" rather than for "program.exe").

This is how it should be done, and it works fine for me in 0.74 and SVN.

After the program is started and the debugger is activated, type the debugger command "D DS:80" and there are the parameters sitting in the program's PSP command tail.

Reply 2 of 2, by ge97aa

User metadata
Rank Newbie
Rank
Newbie

Yes, this works. Not sure what I did wrong before.

Thanks a million.