If you are on a Windows machine, the command line args can be intercepted like this:
Create a little command line tool ShowArgs.exe
that displays the given command line args in a message box.
Create a registry key in SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Foo.exe
whereas Foo.exe
is the name of the compiler without the path.
Add a value with name debugger
and value "" including the quotation marks, e.g.
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Foo.exe\debugger="C:\Temp\ShowArgs.exe"
Now ShowArgs.exe
acts as the debugger for Foo.exe
and is called instead. The first argument is the path to Foo.exe
, all other arguments are the ones you are interested in.