InfoPath 2007 -- Any way to use Visual Studio Debugger in Browser-Enabled Forms - InfoPath Dev
in

InfoPath Dev

InfoPath 2007 -- Any way to use Visual Studio Debugger in Browser-Enabled Forms

Last post 05-03-2010 06:00 AM by sonisick. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 03-26-2010 09:43 AM

    InfoPath 2007 -- Any way to use Visual Studio Debugger in Browser-Enabled Forms

    I have been able to get the debugger to work in Form Preview by Choosing "F5-Start Debugging in VSTA Project". Once I publish the form-I have no idea of how to get information besides writing debug statements to a form library I call event log.

    Is there anyway to debug managed code running in browser-enabled mode?

     

    Filed under: , ,
  • 03-29-2010 03:41 AM In reply to

    Re: InfoPath 2007 -- Any way to use Visual Studio Debugger in Browser-Enabled Forms

    i dont think there is any way, except the one you have said.

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 03-29-2010 04:32 AM In reply to

    Re: InfoPath 2007 -- Any way to use Visual Studio Debugger in Browser-Enabled Forms

    Hi,

    the only way to debug business logic for browser-enabled forms deployed to InfoPath Forms Services is with "Microsoft Visual Studio .Net 2005/2008". You can´t if you only have VSTA.

    If you own one of the above mentioned developer tools you can find more information here:

    http://msdn.microsoft.com/en-us/library/aa944831(VS.80).aspx

    http://blogs.msdn.com/infopath/archive/2006/11/24/debugging-browser-forms.aspx

    Hope that helps.

    Karsten
  • 03-29-2010 06:32 AM In reply to

    Re: InfoPath 2007 -- Any way to use Visual Studio Debugger in Browser-Enabled Forms

    Vielen Dank. I tried. I went though all the steps changing Configuration to Active Debug. Setting a BreakPoint. Uploading in Central Admin. Opening a Visual Studio Project. Attaching to a Managed Process.

    I set the breakpoint in FormEvent_Loading. Not Happens.  This is InfoPath 2007--I noticed the article was on InfoPath 2010.

     

    thanks again,

    Stephan

    PS: I'm starting a blog tonight on www.infopathpainmanagement.com

     

     

  • 03-29-2010 03:09 PM In reply to

    Re: InfoPath 2007 -- Any way to use Visual Studio Debugger in Browser-Enabled Forms

    OK, dann schauen wir mal nach dem Problem... :-)

    Well, you have to be absolutely sure, that the managed code is built (and saved) before you publish your form with the publishing wizard. If you set the breakpoint please consider that the red bullet point is "fully" painted and not just a "ring". In case that it is just a "ring" than you haven´t the same source-code in the built DLL and in the code editor window. Secondly, do you have a pdb-file in the /bin/debug directory? Have you developed your infopath form with the "Infopath"-Client or with "Visual Studio .Net" and the appropriate project template for infopath forms.

    By the way it is right that the instructions in the link related to Infopath 2010 --- but the way is absolut identical with Infopath 2007.

    Regards,

    Karsten
  • 03-29-2010 03:17 PM In reply to

    Re: InfoPath 2007 -- Any way to use Visual Studio Debugger in Browser-Enabled Forms

    Actually, the blog post itself shows a date of 2006. I think that the IP team blog has updated their theme to always show '2010' -- just a wee bit confusing given that they have published posts starting with IP 2003! I actually have tried this technique and never been successful, though -- don't know if I have an issue or the post does... Probably safe to assume the problem is mine! : )

    Hilary Stoupa

  • 03-30-2010 07:11 AM In reply to

    Re: InfoPath 2007 -- Any way to use Visual Studio Debugger in Browser-Enabled Forms

    Nahe aber keine Zigarre!!

    First my project is VSTA. Created from InfoPath by choosing Programming.

    I found out even though I had changed the configuration to Active(Debug)--the Debug File were not being produced.

    I got some help from a younger programmer twice as experience as me.  I'm not sure this is what caused my Debug Build to start working but under Build--there is an Advanced Option and on Debug Info I chose "full".

    He also looked at the Configuration Manager and the project. The Active solution configuration is set for "Debug" and Active solution platform is "Any CPU".

    I know I'm getting a pdb file. Infact, I wiped out all the release stuff.  I am sure I have a valid break point. I have debugged other wsp project.

    I also checked the source files for the published file being uploaded and it has a pdb with the dll.

    I am on a 64bit plattform. I go into Visual Studio and under tools and a attach to a process. Making sure "Managed Code" is checked. Then I try to open the form in the browser.  I have only one w3wp process showing.  The form works normally. My breakpoint was on the first statement in FormEvents_Loading: 

    string whichEnvironment=string.Empty;

     

    Thanks again for your attention to detail. My German is terrible. My mother was German from arround Hanau.

    Please check out a blog I just started www.infopathpainmanagement.com

     

     

  • 04-30-2010 01:14 PM In reply to

    Re: InfoPath 2007 -- Any way to use Visual Studio Debugger in Browser-Enabled Forms

    Finally able to debug browser-enabled forms.

    Place a breakpoint in my code won't work--I need the actual statement:

    System.Diagnostics.Debugger.Break()

    After having the Project in Debug Version and the pdb included--Attaching to the w3wp process and choosing managed code--it now works.

    thanks for your help.

     

    Stephan

  • 04-30-2010 03:03 PM In reply to

    Re: InfoPath 2007 -- Any way to use Visual Studio Debugger in Browser-Enabled Forms

    Thanks so much for posting the details of what finally worked for you -- it is sure to help others!

    Hilary Stoupa

  • 05-03-2010 06:00 AM In reply to

    Re: InfoPath 2007 -- Any way to use Visual Studio Debugger in Browser-Enabled Forms

    Hiliary,

    What's even cooler is that if you use System.Diagnostics.Debugger.Break()  you don't even have to open another Visual Studio Project  and "Attach to the Process".  A Just in Time Debugger pops up.  The following explains that there are different API's for the manual breakpoint and the System.Diagnostics.Debugger.Break() 

     

    http://blogs.msdn.com/jmstall/archive/2006/07/03/managed-Vs-native-apis.aspx

     

Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.