The Visual Studio debugger can attach to a process.
Once a DLL is loaded into the process being debugged the debugger should be able to debug the loaded DLL assuming that its source code is available. Otherwise, you would have to use the Disassembly window.
Exactly how are you "manually injecting" your DLL into the test.exe process? Maybe the process exits too quickly. One thing you can try is to use some code in the DLL to give you time to act. For example, the DLL could use a call to MessageBox() after it has been "injected". At that time you could do what you need to do before you dismiss the modal dialog. Or put some kind of a delay in test.exe.