My plugin doesn't stop on Beakpoints

sphairos used Ask the Experts™
Hi guys,

I'm seeing strange behaviour with a plugin for Readsoft that I'm developing.

I want it to stop on a breakpoint but it doesn't. The msgbox just before the place I put the breakpoint is displaying correctly, and the one right after it too.

I need your help because I don't have any clue of what the problem is.

Thanks for your help!

PS : I'm using Visual Studio 2010 Professional, coding in VB.NET
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2015

In order for a breakpoint trigger, the Generate debug info option should be activated for the configuration you are working with (the Debug / Release ComboBox) in the Advanced Compiler Settings of the Compile tab of the project's properties window. In most cases, it should be set to pdb-only for the Debug configuration and to None for the Release version.

Be careful, because there are 2 comboboxes listing the configuration. The one in the toolbar is use to define which one you want to compile and/or run. The one at the top of the Compile tab defines which of the configuration you are settings the option for.


Thanks for your answer.

Actually it is on Debug mode that's why I don't have any clue on how to get my debugger working.

Maybe if I explain my config better it will help :

here is the class with the breakpoint I want to stop to

here is the properties file that launch the ReadSoft programm it is going to run into

here is the ReadSoft programm with the Msgbox displayed after the breakpoint line where debug didn't stop

Hope this help, I'm really stuck
Top Expert 2015

From what I see, your problem occurs before Connect is called. I do not see the code that displays the MessageBox, so no way to know what could happen.

Might well be that Connect is not called at at.

I would put a MessageBox at the beginning of Connect. It that one does not show, then it means that Connect is never called, and the problem is not with your breakpoint, but with the code that calls Connect.

Your code looks like mine. Commentaires en français mais variables, méthodes et classes in English :-)

It's not the fact that you are in Debug that triggers breakpoints, it is the way the Debug configuration is set in the project's properties Window. Have you checked the Generate debug info I was mentioning in my first answer?

I have a feeling that you might not work much with the project's properties. Do you know that you can set the options there for all the project instead of having to set them at the top of each file?

And if I were you, I would set Option Strict On. It will force you to look at your code more closely and can prevent a lot of hard to find bugs.
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.


I'm sorry I'm so unclear...

In fact it goes well through the connect() function the msgbox was in the first line of the connect() function and was displaying well even if I put a breakpoint on it, it displays the msgbox without stoping.

You right I don't know much of how to use project's properties (I'm used to develop in ASP.NET which is quite different)

I have a feeling that you might not work much with the project's properties. Do you know that you can set the options there for all the project instead of having to set them at the top of each file?
So how?

It's not my code (an ex collegue did this before me :) )
Top Expert 2015

OK. In the Project menu, usually the last entry in the menu, you have the project's properties. This is where you set most of the compiler and debugger options as well as a few other things. If you are to go on with Windows Application development, I suggest that you spend some time to explore that. F1 from any of the tabs gives you a good overview of what everything is about.

For your problem, here is a possible cause.

Open the project's properties window as describe earlier.

Go into the Compile tab.

In the Configuration drop down at the top, select Debug, since this is the configuration in which you want the debugger to be active.

Under the Advanced Compile Options button, in the same tab, there is a setting to Generate debug info. This should not be set to None. Pdb-only is usually sufficient when programming in VB. This enables the debugger to link the compiled code with the source code, so it is able to break when needed in the .exe, and bring you to the correct source code line when there is an exception.

The code not being executed or the pdb not being generated are the 2 main causes of breakpoints not being activated.

If this does not solve your problem, a little question. Does the sphere indicating a breakpoint stays red while the application is running in Visual Studio, or does is turn to an empty circle.


Ok thanks for the precious informations.

So to answer you the sphere is still full it doesn't come empty I guess it is a good clue for you? :)

Here is my Advanced Complier Settings window. The "Generate debug info" was on "Full" before
Top Expert 2015
If the sphere is still full, then I don't understand. This means that the breakpoint is active. The following advice is thus only a guess. Read to the end before attempting anything.

You might try to put a Stop instruction. This does the same thing as a breakpoint. BUT BE SURE to remove it once the problem is solved. A Stop instruction ends up as an error when the application runs outside of Visual Studio.

You are in Visual Studio 2010, but your target framework is set for Framework 2.0 (at the bottom of your Advanced Compiler Settings). This is the framework that was used in Visual Studio 2005, 2 versions behind. Visual Studio 2010 usually runs on Framework 4.0.

I cannot say if it is the cause of your problem, I personnally migrates my applications with every new version of VS, so I have never used VS2010 with Framework 2.0. Maybe... I insist of maybe because it is not something I have experienced, the debugger in VS2010 does not work properly with applications that target Framework 2.0.

Try to find if you really need Framework 2.0. It migth be that the user's computers have not been upgraded and won't be because some administrator has decided so for whatever reason. It might be that Readsoft does not support higher versions of the framework. I do not know Readsoft, so I have no way to tell. By the way, have you asked them if they software might not prevent you from using the debugger in some way?

If you do not see any reason why the target is still 2.0, make a backup of the project just in case and switch to the target to version 3.0. See if it solves your problem and if it still works with Readsoft. If so, backup again and try moving up to version 3.5. Then on to 4.0. You can forget about the client profiles from what I know of your situation. Do not skip a version however. If there is a breaking change between versions of the framework, you will get warnings when you move up one version at a time, but might get errors if you keep a version in between.

Good luck, and let's hope that somebody that might have a better insight about your problem jumps in. What I suggest is what I would do, but since I never experiences what you are experiencing, I cannot suggest a straigthforward solution.


Ok you guessed well!

It was a problem of .NET framework!

Thanks a lot for your patience and your help!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial