1

VS2005 c++

I have a sln that contain 2 exe and several dll A.exe invoke B.exe than B.exe invoke other dll

I wanna insert break point in codes of B.exe and dll
but if I set A.exe the startup project, breakpoint in B and dll is invalid

if I set B.exe the startup project, than only B.exe runing, but A.exe is necessary for me because lot of thing must be done by A

if set Both A and B the startup project, it's avalible to debug B, but you know when A runing ,it will invoke another B, so 2 B.exe run at sametime ,that's not what i want

so ,any one could help me, i was really boring for this for a long time,

any suggestion is appritate thanks

4

2 に答える 2

0

必要な数の B をデバッグできます。十分な数の Visual Studio 2005 インスタンスを起動し、MSVC 2005 の各インスタンスでプロジェクトを開き、[デバッグ] -> [プロセスにアタッチ] を選択して、B プロセスの必要なインスタンスを選択します。

于 2013-10-30T07:27:38.763 に答える
0

画像ファイル実行オプションを使用できます

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\B.exe]
"Debugger"="vsjitdebugger.exe"

また、Visual Studio コマンド プロンプトでこのコマンドを機能させるには、事前にこのコマンドを実行する必要がある場合があります。

vsjitdebugger.exe /regserver

次に、B.exe が実行されると、デバッグを求めるポップアップ ウィンドウが表示されます。

ソース コードにDebugBreak()を挿入してデバッガを中断することもできます。

于 2013-10-30T08:52:33.517 に答える