Stepping through a vb class or method

J

JPS

Does anyone know how to add a VB class to a C# project and then
instantiate the Vb object and step through the code?
Can we do tihs with a VB DLL?
 
M

Michael Nemtsev

Hello JPS,

Only using interop, to call your VB code as COM class.
VB class can't be instantiated from C# directly.

To step into your code you need to attach the debugger to your runned VB
COM instance

J> Does anyone know how to add a VB class to a C# project and then
J> instantiate the Vb object and step through the code?
J> Can we do tihs with a VB DLL?
---
WBR,
Michael Nemtseva [C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangel
 
J

JPS

Hello JPS,
Michael,
How do I attach the debugger to the COM class?

Only using interop, to call your VB code as COM class.
VB class can't be instantiated from C# directly.

To step into your code you need to attach the debugger to your runned VB
COM instance

J> Does anyone know how to add a VB class to a C# project and then
J> instantiate the Vb object and step through the code?
J> Can we do tihs with a VB DLL?
---
WBR,
Michael Nemtseva [C# MVP] :: blog:http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
 
C

Chan Ming Man

If it is COM then I would suggest you it is easier to write a stub to step
it through your VB 6 code in VB 6 and then Interop with C#.

chanmm

JPS said:
Hello JPS,
Michael,
How do I attach the debugger to the COM class?

Only using interop, to call your VB code as COM class.
VB class can't be instantiated from C# directly.

To step into your code you need to attach the debugger to your runned VB
COM instance

J> Does anyone know how to add a VB class to a C# project and then
J> instantiate the Vb object and step through the code?
J> Can we do tihs with a VB DLL?
---
WBR,
Michael Nemtseva [C# MVP] :: blog:http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and
we
miss it, but that it is too low and we reach it" (c) Michelangelo
 
J

JPS

It is VB.Net
I created the DLL , but I am not sure how to open it and step through
it in C#

If it is COM then I would suggest you it is easier to write a stub to step
it through your VB 6 code in VB 6 and then Interop with C#.

chanmm





Michael,
How do I attach the debugger to the COM class?
Only using interop, to call your VB code as COM class.
VB class can't be instantiated from C# directly.
To step into your code you need to attach the debugger to your runned VB
COM instance
J> Does anyone know how to add a VB class to a C# project and then
J> instantiate the Vb object and step through the code?
J> Can we do tihs with a VB DLL?
---
WBR,
Michael Nemtseva [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and
we
miss it, but that it is too low and we reach it" (c) Michelangelo- Hide quoted text -- Show quoted text -
 
G

Guest

If it is VB.NET, Add it to the solution and add a reference to it from the
Projects tab of the references dialog. This will make it step into the code.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top