locked
How do I use the jitDebugger?

    Question

  • Earlier today I asked two questions.  The first has been answered.  Now I need to know how to attach the jitDebugger to MyApp.exe.  Can someone help me with this?

    I (wow, nope.  Those related threads (thread actually) don't answer my question, which you probably can't see.  Impressive though.) also need to know how to shut down a running app when a newer version is being installed.

                                                                                                    Thanks,
                                                                                                        BLeRg.
    Wednesday, May 13, 2009 6:47 PM

Answers

  • So, did you get an error message that said something like:

    Unhandled exception has occured in your application blah blah ....

    and then when you click Details you see:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    ....
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.



    Just do what it says and the jit debugger will be enabled ;).
    • Marked as answer by Xingwei Hu Wednesday, May 20, 2009 4:45 AM
    Thursday, May 14, 2009 12:59 AM
  • Umm. Do you already have a config file? If not, create a text file called MyProgram.exe.config (where MyProgram.exe is the name of your program) and put there

    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>


    If you already have a config file, just add the line

    <system.windows.forms jitDebugging="true" />

    to the configuration section.
    • Marked as answer by Xingwei Hu Wednesday, May 20, 2009 4:45 AM
    Thursday, May 14, 2009 8:48 AM

All replies

  • You can put a breakpoint in you application and run it.
    Thanks,
    A.m.a.L
    .Net Goodies
    Remember to click "mark as answered" when you get a correct reply to your question
    Wednesday, May 13, 2009 6:57 PM
  • I've already tried that.  It didn't work.  Oh, the app isn't running under debug at the time it throws the exception.  That's where the jitDebugger comes in.  It's suppossed to open a debugger like devenv.exe.  The reason it's not running in the debugger is because I clicked on the desktop icon to open it, and then I right clicked on MyApp's Notify Icon to launch another app.  So setting a break point at this point won't work.  But...

                                                                                     Thanks,
                                                                                         BLeRg.

    Wednesday, May 13, 2009 7:06 PM
  • So, did you get an error message that said something like:

    Unhandled exception has occured in your application blah blah ....

    and then when you click Details you see:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    ....
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.



    Just do what it says and the jit debugger will be enabled ;).
    • Marked as answer by Xingwei Hu Wednesday, May 20, 2009 4:45 AM
    Thursday, May 14, 2009 12:59 AM
  • I tried to include the XML config file three times, but I don't know how to do that without exploding this text or something. So I'll try to include the (open square bracket)System.Windows.Forms(close square bracket) section in it.

    I just don't get it.
    • Edited by iamBLeRg Thursday, May 14, 2009 7:48 AM I just don't get it.
    Thursday, May 14, 2009 7:44 AM
  • Umm. Do you already have a config file? If not, create a text file called MyProgram.exe.config (where MyProgram.exe is the name of your program) and put there

    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>


    If you already have a config file, just add the line

    <system.windows.forms jitDebugging="true" />

    to the configuration section.
    • Marked as answer by Xingwei Hu Wednesday, May 20, 2009 4:45 AM
    Thursday, May 14, 2009 8:48 AM