Microsoft Developer Network > Página principal de foros > Phoenix > Some Problem about Phoenix redirect Plug-in's output??
Formular una preguntaFormular una pregunta
 

PreguntaSome Problem about Phoenix redirect Plug-in's output??

  • jueves, 29 de octubre de 2009 11:03John Connor Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     

    Hello everyone :

    could it does just like the title?
    i want to redirect output to a file just like "FlowGraph.txt";
    so i add the follow code to the Execute method:

    System.IO.TextWriter t = new System.IO.StreamWriter("FlowGraph.txt");





    System.Console.SetOut(t);



    i built the plug-in, it done.
    but when i use the commod line just like "cl -d2plugin:FlowGraph.dll test.cpp"


    it output the follow line to the console(not the file):

    fatal error C1001:An internal error has occurred in the compiler.
    (compiler file 'd:\enlistments\sdk_june08\src\clients\c2\c2-diagnostice.cpp',line 742)
    Unhandled Exception

    why ?? i think i did all the right thing!!

Todas las respuestas

  • viernes, 30 de octubre de 2009 7:50Andy Ayers - MSFTModeradorMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    You should be able to run this under the debugger and get more information about what is going wrong.

    First, compile your plugin with /debug+.

    Then, in the command shell, run

    devenv -debugexe cl -d2plugin:FlowGraph.dll test.cpp

    Visual studio will launch and create a special debugging project for cl.exe. Right click on this project and select properties, then debugging. Set the debugger type to "Managed Only" and click OK to close the property sheet. Then go to the Debug menu and choose Exceptions. Put checkmarks in the "thrown" or "first-chance" column for the various exception types. Hit F5 to launch cl.exe under the debugger. When the exception happens the debugger will gain control and you can see where you are in the code and what kind of problem is being hit.
    Architect - Microsoft Phoenix Project