Debugging a VB.Net DLL

J

Jim Bancroft

Hi everyone,

I have a DLL and a console app I'm using together, both created in VB
..Net. I've added both projects to a Visual Studio solution, and have a
breakpoint set on my console app, where it calls a public method on one of
the dll's objects.

When I reach my console app's breakpoint and hit F11 to "step into" the
dll method, I just skip to the next line of the console app. That is,
unless I have a breakpoint set on the dll's method.

Is that behavior by design, or can I arrange things so that I don't need to
set breakpoints in ancillary projects when debugging my main app? Thanks
for helping me clear this up.

-Jim
 
S

Steve Long

Did you set a reference to the project or the file dll? If you set it to the
file reference, this is the behavior you can expect.

Steve
 
J

Jim Bancroft

Hi Steve,

Well, you're right in that I did set a reference to the file dll originally.
But I'm not quite sure how to set a reference to the project, instead of the
file-- when adding references this time I clicked the "Project" tab (I
removed my file reference first), and sure enough my dll project was right
there. I selected it, am now using it, but the problem remains.

I must be doing something wrong-- maybe I didn't pick the "project"
reference correctly? In case you hadn't guessed, I'm somewhat new to
multi-project debugging in .Net.

-Jim
 
S

Steve Long

Well, I'm not sure which layout you are using in your IDE, I have the VB
developer selected so when I hit F8, it steps into. However, you probably
left it as default so F11 is probably step into.

Nowever, if you remove the reference to the file dll and then add the
reference to the project dll, that should work. Sometimes you have to close
down the IDE and reopen it for things to work right. I don't know why that
is. NTL, if you put a break point in your dll project, you should be able to
step into it just fine.

Steve
 

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