c# - Debug worker project run as a process from another project in VS -
i have 2 projects. 1 of them worker application stuff. other 1 gui worker (gui runs async processes instances of worker). worker project output .exe
file used gui.
how debug worker? there possibility of doing it? annoying thing can create command line interface worker , generate kind of reference params run separatelly, problem when want more 1 instance (i have program generates data async have find error in code works fine in 1 process, buggy in more one).
you don't give info interaction between gui , worker, if attaching process hard (typically beacuse worker runs briefly), more usable scenario add configuration option gui add argument worker command line, on worker responds debugbreak. example worker's main be
var args = parsearguments(); //check if string 'waitfordeugger' on command line if( args.requestsdebug ) system.diagnostics.debugger.break(); ....
and gui invokes worker this:
var args = getargumentsforworker(); if( somespecialdebugoptionenabled ) args += " waitfordeugger"; process.start( "worker.exe", args );
Comments
Post a Comment