I am working on debug support in C/C++ Unit Testing Plugin
means that user should be able to easily start debug
session for the "C/C++ Unit" configuration.
To make "C/C++ Unit" view work properly I need to be
able to do 2 things:
I also want to reuse standard CDI
& DSF launch
delegates as much
as possible and I want to place all the code
necessary for test
- I need to be able to provide additional program
arguments (not only stored in PROGRAM_ARGUMENTS
attribute of launch configuration);
- I need to be able to handle output and/or error
streams of the started process (and prevent its
output to "Console" view).
For CDI I decided to derive LocalCDILaunchDelegate.
To handle program arguments I have just override getProgramArgumentsArray().
output/error streams I have
wrapped the process creation in launchLocalDebugSession()
with a custom method wrapProcess()
default just return the process passed to its arguments.
However in my implementation of delegate it stores the
necessary stream and returns a wrapper (that returns null
Is this an acceptable solution?
And if yes, could I move LocalCDILaunchDelegate from org.eclipse.cdt.launch.internal
to be able to place
my delegate in org.eclipse.cdt.testsrunner
Or will it be better to configure package visibility in
"Runtime" tab of plugins.xml
and to add org.eclipse.cdt.testsrunner there
For DSF I have no solution how to do the similar things.
I have found that program arguments are provided by GDBBackend
service and the inferior process is created in GDBProcesses
, but I don't know how I
can override the default behaviour. Can somebody advise
me something or is there another way to do the things