问题
Can I somehow setup visual studio to launch a cmd.exe replacement (on this case TCC/LE, from JP Software) console when debugging console applications?
I have it setup on the Tools Menu as an External tool with a start directory pointing to the project debug bin folder. But I'd like a more immediate access, just so hitting the F5 key (Start Debugging) would launch the application in this cmd.exe replacement instead.
回答1:
In the project properties for your console project select the debug tab. There are 3 radiobuttons there that specify how the project is started when you hit 'F5'. The default value is 'start project' in your case I assume you need to select 'start external program' and specify your cmd replacement with any arguments to get the debug app launched from it.
For cmd.exe it would be the /c or /k option to launch something else from the command shell.
回答2:
I use Clink.
It doesn't replace cmd.exe, but makes it something I can very much live with. By using Clink, I don't need to worry about injecting an alternative. Instead, cmd.exe works mostly as I'd like it to.
来源:https://stackoverflow.com/questions/6720999/how-to-make-visual-studio-debug-session-launch-a-cmd-exe-replacement