Author Topic: WinDbg -> Attach to process causes DebugCreate failed  (Read 7165 times)

chalko

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
WinDbg -> Attach to process causes DebugCreate failed
« on: September 23, 2010, 11:32:26 am »
Hello, I am just reposting the text from a support case I opened here to get more opinions...

Hello, I am trying to use windbg from within SlickEdit 2010 by using the Windbg -> Attach to process(Windbg) option. The output window sais "Initializing Debugger." but no further output. I also get two popups, the first one sais Error starting debugger: DebugCreate failed and when I ok it I get a second one that sais Error Initializing debugger: DebugCreate failed.

My setup is probably not ideal in that we internally compile individual dlls from the command line (ultimately using vc8) and launch an .exe to our scripting language development environment that then dynamically loads dlls as they are needed. The projects I create in my workspace in SlickEdit are purely there for code tagging/navigation and development. They are generally one project per generated dll but that is not the whole truth.

Also, since this is a company PC, we do not have write access to the SlickEdit installation folder and I am not sure if that affects how macro variables are saved. The helpdesk/administrator performed the upgrade from version 14/2009 to 15 and I have not been given an option to select between visual studio and integrated windbg as specified in the help files for using windbg. I have checked that the 2 required dlls stated in the help files are present in C:\windows\system32 and have had my administrator copy them to the win folder in SE as well but no luck.

Any ideas? Thanks!

SlickEdit Support

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 290
  • Hero Points: 26
Re: WinDbg -> Attach to process causes DebugCreate failed
« Reply #1 on: September 23, 2010, 04:22:42 pm »
Hi Chalko,

We are continuing to investigate this with the SlickEdit Dev Team and will continue to work on this issue via your Support Case.

We will post back to this thread with our findings.

Best,
SlickEdit Support

csrajput

  • Community Member
  • Posts: 8
  • Hero Points: 1
Re: WinDbg -> Attach to process causes DebugCreate failed
« Reply #2 on: March 11, 2011, 11:48:32 pm »
Hi,

Is there any solution to this problem? I am also facing this issue. I am not able to debug with WinDbg in any way.

- Charan

Dan112123

  • Community Member
  • Posts: 44
  • Hero Points: 2
Re: WinDbg -> Attach to process causes DebugCreate failed
« Reply #3 on: September 13, 2011, 09:21:15 pm »
I would also like to know if there is a solution to this issue.

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: WinDbg -> Attach to process causes DebugCreate failed
« Reply #4 on: September 14, 2011, 02:50:35 pm »
If DebugCreate fails, it means that SlickEdit was unable to initialize a COM interface for the debug client in dbgeng.dll.   That could happen for a couple of reasons.  It could fail if you are running the 64-bit version of SlickEdit and the 64-bit dbgeng.dll isn't available.  Or it could be an old version of of dbgeng.dll and doesn't have the interface we need for debugging.  If you have one the latest builds of Debugging Tools for Windows and the correct platform (64-bit/32-bit), there is a macro variable (Macro > Set Macro Variable...) def_windbg_path, you can use to set the value to the path to specific dbgeng.dll and dbghelp.dll.  There may be multiple versions of this DLL in your PATH, so you may need to tell SlickEdit which one is the latest.

Jerm_jp

  • Community Member
  • Posts: 42
  • Hero Points: 0
Re: WinDbg -> Attach to process causes DebugCreate failed
« Reply #5 on: September 28, 2011, 03:02:55 am »
After verifying that the 'def_windbg_path' was set via Macro -> Set Variable I still encountered the DebugCreate failed.
Ex: Variable: def_windbg_path
Ex: Value: "C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe"

I also added the 'Debugging Tools for Windows' path to the system path, DebugCreate failed.

I copied the 'dbgeng.dll' and 'dbghelp.dll' DLLs to the SlickEdit\win directory
DLL Source directory: C:\Program Files\Debugging Tools for Windows (x86)
DLL Target directory: C:\Program Files\SlickEditV16.0.2\win

Now I am able to debug using WinDbg via Slickedit.
I am using WinDbg 6.12.0002.633 X86 on Windows XP SP3 (x86)

If this is an issue with multiple versions of the DLL being found a dialog explaining that such a condition exists would be useful.
With this work around, with every new release of Slickedit repeating this procedure is required. Copying to the windows system32 directory could be another option, but I am just sharing what worked for me in the hope it would allow other people frustrated by this problem to stop from having to switch back and forth beween Slickedit and Developer Studio.

Jeremy
« Last Edit: September 28, 2011, 03:09:06 am by Jerm_jp »

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: WinDbg -> Attach to process causes DebugCreate failed
« Reply #6 on: September 28, 2011, 12:38:43 pm »
Setting def_windbg_path should have worked, though the value should have just been just he path to dll: "C:\Program Files\Debugging Tools for Windows (x86)".

Sorry for the confusion.


Jerm_jp

  • Community Member
  • Posts: 42
  • Hero Points: 0
Re: WinDbg -> Attach to process causes DebugCreate failed
« Reply #7 on: September 28, 2011, 11:53:20 pm »
Lee,
Thank you for the clarification.
I removed the 'dbgeng.dll' and 'dbghelp.dll' DLLs from the Slickedit\win directory and verified that the DebugCreate error would occur.

The DLLs are set in the system path as I can launch WinDbg from the standard windows command line. One would think that Slickedit would find these DLLs as well.

I modified the 'def_windbg_path' variable as per your suggestion, applied the changes, exited and restarted Slickedit. The DebugCreate error continues to occur.

I am content with copying the DLLs to the Slickedit/win directory but in the interest of determining the root of the problem (if it is really a Slickedit specific problem) is there any additional information that I can provide to assist in solving this issue?
Addidtionally, if any of the other users experiencing the behaviour could report what settings worked or had no effect would be valuable.

Best regards,
Jeremy
(Yokohama, Japan)