all groups > visual studio .net debugging > march 2007 >
You're in the visual studio .net debugging group:
Debugging thru AxHost
Hi, How to debug VB6 Activex Usercontrol (ocx) hosted in VB.Net container. Advanced thanks for your help Manoharan ---
On Mar 5, 1:58 pm, "Oleg Starodumov" <com-dot-debuginfo-at-oleg> [quoted text, click to view] wrote: > > How todebugVB6Activex Usercontrol (ocx) hosted inVB.Netcontainer. > > Try the approach described here: http://groups.google.com/group/microsoft.public.vsnet.debugging/brows... > > -- > Oleg > [VC++ MVP http://www.debuginfo.com/] 1. I created a test VB6 Ocx control with create symbolic debug info and disabled optimizations. 2. Register the control using regsvr32 3. created a test VB.net application & hosted the registerd control in the form enabled the Unmanaged code debug. 4. Ran the VB6 ocx application 5. Then ran the VB.Net application It hangs it won't go the break point i have set in the VB6 ocx control. Is anything I am missing. Please help me to debug the VB6 ocx control from VB.Net (thru interop) regards Manoharan
[quoted text, click to view] > 1. I created a test VB6 Ocx control with create symbolic debug info > and disabled optimizations. > 2. Register the control using regsvr32 > 3. created a test VB.net application & hosted the registerd control in > the form enabled the Unmanaged code debug. > 4. Ran the VB6 ocx application > 5. Then ran the VB.Net application > > It hangs it won't go the break point i have set in the VB6 ocx > control. >
If it really hangs, break into debugger and check what it is doing. If it works but does not hit breakpoints in VB6 code, open Modules window and check if the ocx is loaded, and if its symbols have been loaded. Oleg
On Mar 6, 7:31 pm, "Oleg Starodumov" <com-dot-debuginfo-at-oleg> [quoted text, click to view] wrote: > > 1. I created a test VB6 Ocx control with create symbolic debug info > > and disabled optimizations. > > 2. Register the control using regsvr32 > > 3. created a test VB.net application & hosted the registerd control in > > the form enabled the Unmanaged code debug. > > 4. Ran the VB6 ocx application > > 5. Then ran the VB.Net application > > > It hangs it won't go the break point i have set in the VB6 ocx > > control. > > If it really hangs, break into debugger and check what it is doing. > If it works but does not hit breakpoints in VB6 code, open Modules window > and check if the ocx is loaded, and if its symbols have been loaded. > > Oleg
1. How to open or enable Modules window in VS 2005. 2. when I am attaching the ocx provess to VS 2005, it hangs when I break the control goes to VB6 ocx application but it is not hiting the Break Point. Please help to resolve/debug this. regards Mano
On Mar 6, 7:31 pm, "Oleg Starodumov" <com-dot-debuginfo-at-oleg> [quoted text, click to view] wrote: > > 1. I created a test VB6 Ocx control with create symbolic debug info > > and disabled optimizations. > > 2. Register the control using regsvr32 > > 3. created a test VB.net application & hosted the registerd control in > > the form enabled the Unmanaged code debug. > > 4. Ran the VB6 ocx application > > 5. Then ran the VB.Net application > > > It hangs it won't go the break point i have set in the VB6 ocx > > control. > > If it really hangs, break into debugger and check what it is doing. > If it works but does not hit breakpoints in VB6 code, open Modules window > and check if the ocx is loaded, and if its symbols have been loaded. > > Oleg
I found the way to opne the Modules window. 1. I ran the VB6 ocx control 2. attach the process to VS2005 debugger 3. I have opened the modules window bu the ocx & its symbol file is not loaded. Please help to resolve/debug this. Regards Manoharan regards Mano
[quoted text, click to view] > I found the way to opne the Modules window. > > 1. I ran the VB6 ocx control > 2. attach the process to VS2005 debugger > 3. I have opened the modules window bu the ocx & its symbol file is > not loaded. >
In VB.NET application, set breakpoint at some place where you absolutely sure that the ocx will be loaded. After that breakpoint is hit, check the presence of the ocx and its symbols in Modules window. [quoted text, click to view] Also, previously you wrote: > 1. I created a test VB6 Ocx control with create symbolic debug info > and disabled optimizations. > 2. Register the control using regsvr32 > 3. created a test VB.net application & hosted the registerd control in > the form enabled the Unmanaged code debug. > 4. Ran the VB6 ocx application > 5. Then ran the VB.Net application
I am not sure that I understand why step 4 is needed. What kind of application did you run in step 4? Usually you need only VB.NET application, which loads the ocx, and do not need to run other applications. Oleg
[quoted text, click to view] > > In VB.NET application, set breakpoint at some place where you absolutely > > sure that the ocx will be loaded. After that breakpoint is hit, check the presence > > of the ocx and its symbols in Modules window. > > I did the above step & the ocx control is loaded and its symbol is al > lodaded. > > This is the line I copied from the modules window. > > "DebTest.ocx D:\debug test\DebTest.ocx N/A N/A Symbols loaded. D: > \debug test\DebTest.pdb 33 1.00.0.0 3/6/2007 5:28 PM 11000000-11006000 > [3172] W.exe: Native " > > I have set break point in the ocx also but it is not hiting the break > points of the ocx control. >
Try to show a message box from the ocx (when it is called by the client app). While this message box is shown, break into debugger, check the call stack and switch to a stack frame that belongs to the ocx. Will the debugger be able to show you the ocx' sources in this case? Oleg
[quoted text, click to view] > > Try to show a message box from the ocx (when it is called by the client app). > > While this message box is shown, break into debugger, check the call stack > > and switch to a stack frame that belongs to the ocx. Will the debugger be able > > to show you the ocx' sources in this case? > > > > Yes in this case the Debugger shows the VB6 ocx source in VB.Net. But > I want step into VB6 Ocx control. > > How I have to step into VB6 ocx. >
I am not sure it's possible to step between VB.NET and VB6 code in this case, AFAIR breakpoints always had to be used as a workaround. Btw, do breakpoints work now? (e.g. if you set breakpoint in the source that has been shown by the debugger, e.g. in a place that will be executed after you dismiss the message box) Oleg
[quoted text, click to view] > In VB.NET application, set breakpoint at some place where you absolutely > sure that the ocx will be loaded. After that breakpoint is hit, check the presence > of the ocx and its symbols in Modules window.
I did the above step & the ocx control is loaded and its symbol is al lodaded. This is the line I copied from the modules window. "DebTest.ocx D:\debug test\DebTest.ocx N/A N/A Symbols loaded. D: \debug test\DebTest.pdb 33 1.00.0.0 3/6/2007 5:28 PM 11000000-11006000 [3172] W.exe: Native " I have set break point in the ocx also but it is not hiting the break points of the ocx control. I need to step into the OCX control. regards Mano
On Mar 7, 3:27 pm, "Oleg Starodumov" <com-dot-debuginfo-at-oleg> [quoted text, click to view] wrote: > > > In VB.NET application, set breakpoint at some place where you absolutely > > > sure that the ocx will be loaded. After that breakpoint is hit, check the presence > > > of the ocx and its symbols in Modules window. > > > I did the above step & the ocx control is loaded and its symbol is al > > lodaded. > > > This is the line I copied from the modules window. > > > "DebTest.ocx D:\debug test\DebTest.ocx N/A N/A Symbols loaded. D: > > \debug test\DebTest.pdb 33 1.00.0.0 3/6/2007 5:28 PM 11000000-11006000 > > [3172] W.exe: Native " > > > I have set break point in the ocx also but it is not hiting the break > > points of the ocx control. > > Try to show a message box from the ocx (when it is called by the client app). > While this message box is shown, break into debugger, check the call stack > and switch to a stack frame that belongs to the ocx. Will the debugger be able > to show you the ocx' sources in this case? > > Oleg- Hide quoted text -
Yes in this case the Debugger shows the VB6 ocx source in VB.Net. But I want step into VB6 Ocx control. How I have to step into VB6 ocx. Mano
On Mar 7, 4:44 pm, "Oleg Starodumov" <com-dot-debuginfo-at-oleg> [quoted text, click to view] wrote: > > > Try to show a message box from the ocx (when it is called by the client app). > > > While this message box is shown, break into debugger, check the call stack > > > and switch to a stack frame that belongs to the ocx. Will the debugger be able > > > to show you the ocx' sources in this case? > > > Yes in this case the Debugger shows the VB6 ocx source in VB.Net. But > > I want step into VB6 Ocx control. > > > How I have to step into VB6 ocx. > > I am not sure it's possible to step between VB.NET and VB6 code in this case, > AFAIR breakpoints always had to be used as a workaround. > Btw, do breakpoints work now? (e.g. if you set breakpoint in the source that has been > shown by the debugger, e.g. in a place that will be executed after you dismiss > the message box) > > Oleg
Thanks for your responses and valuable guidence. This is helping me to debug the ocx control to some extend using the .Net IDE. Thanks & Regards Manoharan
Don't see what you're looking for? Try a search.
|
|
|