Reputation: 609
I have a process 'a.exe' which I can debug it without any problem.
mono --debug --debugger-agent=transport=dt_socket,server=y,address=127.0.0.1:55555 a.exe
The problem occurs when I want to debug a new process ('b.exe') started by 'a.exe' instead of 'a.exe' itself. Here is the code.
var startUpInfo = new ProcessStartInfo('b.exe', argumentsOfB);
Process.Start(startUpInfo);
I have to pass the same options as above to mono to be able to debug 'b.exe' and use VSCode to attach to the url and port specfied.
The problem is Process.Start() only receives arguments for my exe, not mono.
Is it possible to do this? Or there is another way to solve this?
My Environment
Upvotes: 0
Views: 758
Reputation: 1977
Just passing 'mono' to the ProcessStartInfo and adding all the arguments (mono's debug args, your *.exe, and your program's args) should do the trick. Make sure to use a different port if you want to be able to debug the a.exe and the b.exe.
Upvotes: 1