Kernel debugger + VS managed debugger

Discussion in 'Windows Vista Drivers' started by Armin Zingler, Jan 15, 2008.

  1. Hi,

    I'm not really developping device drivers, though I think this group has
    most experience with kernel debugging.

    I have two PCs (WinXP/SP2) connected via nullmodemcable (only option
    available; works well). PC #1 is the machine to be debugged, PC #2
    runs Windbg. Now, don't you guys sometimes also develop "usual"
    applications on PC #1, I mean the PC that has an active kernel debugger
    (/debug option in boot.ini)? "Usual" means: What I was trying is start
    VS.Net ( in particular) and do my everyday managed .Net
    application development.

    My problem now is that VS tells me that debugging is not possible
    because a kernel debugger is attached. (I personally don't care but
    obviously this is a conflict.) You can tell me this is a VS problem and
    should be asked in a VS group. Well, maybe, but I think most people over
    there rarely have a kernel debugger running. More people here will still
    work with VS while having a kernel debugger active.

    So, my question ist, how do you handle the situation? Am I really not
    able to do managed .Net debugging just because a kernel debugger is
    active? I must be doing something wrong because I don't find any
    information about it although I think this must be a very common

    I've found:

    The fix (#3) says "In the Kernel Debugger, disable user-mode
    exceptions." Isn't this done with the "/debug=noumex" switch? I've tried
    it but VS' complaint about the running KD doesn't go away.

    Armin Zingler, Jan 15, 2008
    1. Advertisements

  2. I have two PCs (WinXP/SP2)

    noumex is supported only on Win2003 and later.

    On Win2003 and Vista you can also disable kernel debugger
    at runtime using kdbgctrl.exe.
    Pavel Lebedinsky [MSFT], Jan 16, 2008
    1. Advertisements

  3. Ah, I didn't see this. Thanks.
    I know, but I'm running XP. So, does this mean I am not able to debug my
    managed .Net applications while a kernel debugger is active? That's

    On the other side, maybe I don't need it anymore, because yesterday, I
    was able to catch a bugcheck that I was waiting for. It's 0xfc
    (ATTEMPTED_EXECUTE_OF_NOEXECUTE_MEMORY) in kmixer.sys in process
    "System". Though, this won't help me because it's a part of the OS that
    I can't exchange.

    Anyways, thanks for the information.

    Armin Zingler, Jan 16, 2008
  4. Armin Zingler

    Tim Roberts Guest

    In my case, I have one boot.ini line with /debug and one without, and I
    only boot with /debug when I'm actually going to be doing debugging.
    Tim Roberts, Jan 18, 2008
  5. Which debugging do you mean? Debugging managed .Net apps?

    After Pavel gave the hint that /debug=noumex is not available in WinXP,
    I now also have it like you (one with and one without /debug). The
    problem is still that I can't debug my managed .Net apps (that is my
    everyday's business) as long as the kernel debugger is active.

    I have to live with it. Workaround (if anybody comes across the same
    problem): Install a Virtual PC in order to debug managed apps in a box.


    Armin Zingler, Jan 18, 2008
  6. Armin Zingler

    Tim Roberts Guest

    No, when I'm doing kernel debugging. I don't do any managed work.
    Maybe I'm just being dense here, but it sounds like you boot with /debug
    virtually all of the time. Why? What's the gain? My development machine
    NEVER runs with /debug, and my driver test machine only uses /debug when
    I'm going to attach the kernel debugger. Other than that, what's the
    Tim Roberts, Jan 20, 2008

  7. That's a common situation. Please have a look at the start of Ivan's

    You've asked for the reason: BSODs. Before going the kernel debugging
    way, I've tried everything else to find out why the machine crashes with
    a BSOD about once a week. (starting with checking hardware, BIOS,
    reinstall windows, updates, drivers, ...) Now I came to the point where
    everything else did not help (running memtest for many hours, running
    prime95 also without any problem), and I came across the possibility of
    kernel debugging (so, I'm a beginner in this area). I do it also out of
    curiosity. As I don't know when the BSOD will occur, I have to have the
    kernel debugger active all the time. Whenever a BSODs occurs, I am able
    to catch it. But, I have to keep on working with this machine. I mainly
    use if for writing/debugging managed .Net apps. While doing this, it is
    unfortunatelly not possible to have the kernel debugger active in the

    As I wrote in a previous post, I was able to catch a BSOD meanwhile, so
    the problem is kinda "solved".


    Armin Zingler, Jan 20, 2008
  8. So, your requirements is to alway have KD enabled, in order to catch
    some possible bugcheck in the future, while using the machine to develop
    managed code.

    I think the best approach would be to use `kdbgctrl.exe -du`
    when you are using DevEnv.exe.

    I tried VC++2005/ExpressEdition on one of my x64 test
    boxes running Vista, and, I could have KD enable,
    and still have the u-mode debugger to see the exceptions/breakpoints
    rose by the JIT-ed code and mscorlib_ni.dll
    Ivan Brugiolo [MSFT], Jan 20, 2008
  9. "To use this tool, your target computer must be running Windows Server
    2003 or a later version of Windows."

    I have WinXP.

    Armin Zingler, Jan 20, 2008
  10. I have WinXP.

    Then you have no other options left.

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of any included script samples are subject to the terms specified at
    Ivan Brugiolo [MSFT], Jan 20, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.