locked
Development of third-party database DDEX how to debug the code RRS feed

  • Question

  • Hello, everyone! Development of third-party database DDEX how to debug the code, thank you! 
    Friday, June 24, 2011 7:28 AM

Answers

  • Hello,

    What's part of code you are looking for debug? XML or C# code?

     

    If it is the C# code, you can launch the visual studio in debugger. (Solution project properties -> Debug, set the start external program as Visual Studio) We can set breakpoint and do the step into/ step out by debugger as normal.

     

    If it is the XML code, it is hard to perform a debug action using visual studio debugger. We need to test your XML carefully, e.g. change some content and watch how the difference are they.

     

    Regards,

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Yi Feng Li Monday, July 4, 2011 4:53 AM
    Tuesday, June 28, 2011 6:24 AM

All replies

  • Hello,

    What's part of code you are looking for debug? XML or C# code?

     

    If it is the C# code, you can launch the visual studio in debugger. (Solution project properties -> Debug, set the start external program as Visual Studio) We can set breakpoint and do the step into/ step out by debugger as normal.

     

    If it is the XML code, it is hard to perform a debug action using visual studio debugger. We need to test your XML carefully, e.g. change some content and watch how the difference are they.

     

    Regards,

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Yi Feng Li Monday, July 4, 2011 4:53 AM
    Tuesday, June 28, 2011 6:24 AM
  • Hi Yi,

     

    I put devenv.exe in the external program section in the project properties->debug tab, however, when I run visual studio, my breakpoints do not get hit.  The breakpoints are actually lit up red, too.

     

    I know for a fact that the code is getting executed as I started throwing an exception from one of my methods to make sure.  Sure enough, the exception got through and was output by visual studio. 

     

    Any ideas?

    Saturday, September 17, 2011 8:52 AM
  • Have you disabled 'Just My Code' and enabled mixed mode debugging?  I am not familiar with DDEX, but you said you set devenv as the process to debug.  Does this code execute inside of devenv.exe?  When you said the exception 'got through' do you mean it crashed VS?  Or was shown in the output window?  If you set 'Break on first chance exceptions' does the debugging instance of VS break when your code throws that exception?

    Ryan

    Saturday, September 17, 2011 3:54 PM
  • DDEX is essentially a Visual Studio plugin whereby you harness the Server Explorer using custom data sources.  In this case, I'm just running a Microsoft Sample (converted from the Visual Studio 2008 SDK since they inexplicably removed the examples from the VS2010 SDK).  The plugin basically inserts itself into the Server Explorer and you can create a new connection using the sample DLL.

    I have Just My Code disabled because I use reflector.  I couldn't find the option for Mixed Mode Debugging.  However, under the project properties I found a checkbox for "Enable unmanged code debugging".  After selecting that and launching, the debugger took a LOT longer (it was obviously reading visual studio's instructions) and warned me about the missing pdb file for visual studio.  However, there was no change as to whether or not my breakpoints were hit.

    By "go through", I mean that I know that my code is executing as Visual Studio reported the exception to me in a dialog (as it's a sample, I couldn't tell otherwise since I wasn't 100% sure what the difference would be).  For example, I went and expanded my data source and my code was executed because it threw an exception which visual studio caught and displayed to me.  Telling it to break on a thrown exception yields no dice, either.

    I was basically trying to figure out a way that I could debug this code and Yi above stated one.  However, I obviously can't get it to work. 

    Sunday, September 18, 2011 5:08 AM
  • If you break and get a callstack when the dialog is up can you post it here?  I can't explain why you can't debug the code, it sounds baffling.  If the code is running inside VS, and your debugging instance of VS is attached to VS then there should be no reason it can't debug it, and there should be no reason that it doesn't see the exception. The only thing I could think of is that the DDEX stuff is running out of proc.  If you look at VS under say Process Explorer while doing the scenario is it showing any child processes?

    Ryan
    Sunday, September 18, 2011 5:52 PM
  • I'm going to go out on a limb and say that I'm pretty sure that it isn't going to help any since I believe the dialog is provided by Visual Studio itself (even if it used my DLL to get the settings).

    No child processes are showing and the DDEX code is in a Managed DLL.

    Here you go:

    > user32.dll!76adf5be()  
      [Frames below may be incorrect and/or missing, no symbols loaded for user32.dll] 
      user32.dll!76adf5be()  
      System.Windows.Forms.ni.dll!60fd9f7a()  
      System.Windows.Forms.ni.dll!60fd9f7a()  
      System.Windows.Forms.ni.dll!60a995dd()  
      System.Windows.Forms.ni.dll!60a993c1()  
      System.Windows.Forms.ni.dll!60fd8a13()  
      System.Windows.Forms.ni.dll!61014bc3()  
      System.Windows.Forms.ni.dll!61014a0c()  
      System.ni.dll!61c0c64f()  
      System.ni.dll!6187140b()  
      Microsoft.VisualStudio.Shell.10.0.ni.dll!5ff9bdca()  
      Microsoft.VisualStudio.Shell.10.0.ni.dll!600b8b8c()  
      clr.dll!62e025a1()  
      clr.dll!62f37443()  
      clr.dll!62f3751c()  
      clr.dll!62f37582()  
      clr.dll!62f376e7()  
      00a0a207() 
      msenv.dll!63600450()  
      msenv.dll!63600450()  
      msenv.dll!63948c71()  
      msenv.dll!639bdc01()  
      msenv.dll!63b510c1()  
      msenv.dll!63b50faa()  
      msenv.dll!635a124f()  
      Microsoft.VisualStudio.Shell.10.0.ni.dll!600f7ae7()  
      Microsoft.VisualStudio.Shell.10.0.ni.dll!600f7ae7()  
      PresentationCore.ni.dll!5f5c05c5()  
      PresentationCore.ni.dll!5f6ae311()  
      PresentationCore.ni.dll!5f187d45()  
      PresentationCore.ni.dll!5f187cce()  
      PresentationCore.ni.dll!5f1878ee()  
      PresentationCore.ni.dll!5f187311()  
      PresentationCore.ni.dll!5f18217d()  
      WindowsBase.ni.dll!5fbe00a6()  
      clr.dll!62e02e93()  
      WindowsBase.ni.dll!5fbdffd5()  
      WindowsBase.ni.dll!5fbdfe83()  
      WindowsBase.ni.dll!5fbdfdb2()  
      WindowsBase.ni.dll!5fbde2cc()  
      WindowsBase.ni.dll!5fbdf8b8()  
      user32.dll!76ab62fa()  
      user32.dll!76ab6d3a()  
      user32.dll!76ab6ce9()  
      user32.dll!76ab77c4()  
      msenv.dll!6361929d()  
      msenv.dll!63726098()  
      msenv.dll!63726121()  
      msenv.dll!635e17e3()  
      msenv.dll!635e1675()  
      msenv.dll!635e1642()  
      msenv.dll!635e1584()  
      msenv.dll!6368e188()  
      devenv.exe!2f2a0637()  
      devenv.exe!2f2a0fd4()  
      kernel32.dll!753551f3()  
      msvcr100.dll!_onexit(int (void)* func=0x002cf930)  Line 90 + 0x5 bytes C
      msvcr100.dll!__set_flsgetvalue()  Line 145 + 0xc bytes C
      devenv.exe!2f2a20d8()  
      devenv.exe!2f2a2148()  
      devenv.exe!2f2aea7f()  
      kernel32.dll!7535339a()  
      ntdll.dll!77bd9ed2()  
      ntdll.dll!77bd9ea5()  
      mscoreei.dll!72c2f603()  

     

     

    Monday, September 19, 2011 11:34 AM