473,232 Members | 1,411 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,232 software developers and data experts.

Debug, Inheritied forms?


I have run into trouble, I have a form that many of my forms inherits, the
problem is in the IDE I can bring up the Base form into the form editor with
no problem, but trying to bring up one the forms that inherites the base
give an exception in the IDE.

The type initializer for "DacsaNET.Generic_Module" threw an exception.

The problem is that the IDE does not give me an line number or anything to
work with.
(at runtime no problem occur)

Is there a way to "debug" while your are in the IDE, so you can see a little
more info about the exception?

Fredrik Melin
Nov 20 '05 #1
1 955

These are difficult to debug. Usually this means that your constructor of a
particular type is throwing an exception. One way to debug this is to use a
separate instance of Devenv.exe and attach to the instance where your
project is open, and then open the inherited form that causes the problem.

In the instance of Devenv.exe that you are using to debug with, follow
these steps.

1. Start Devenv.exe.
2. Select Tools->Debug Processes.
3. Select the other instance of Devenv (where your project is loaded), and
click Attach.
4. Make sure to select Common Language Runtime, and uncheck Native
debugging, and click OK.
5. Click Close.
6. Select Debug->Exceptions.
7. Expand Common Language Runtime Exceptions->System.
8. Select the System.TypeInitializationException.
9. Under the "When the exception is thrown" section, select the "Break into
the debugger" option, and click OK.
10. Switch over to the other instance of Devenv, and open the form so that
the exception is thrown. When that happens the first instance of Devenv
should break on the line of code where the exception is thrown.

Keith Fink
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Eric Robert | last post by:
Hi, I am writing a C# application that uses a C++ unmanaged DLL. When I turn the unmanaged debug option ON, the application is much slower to start and the unmanaged code is very slow to debug....
by: denis.greatest | last post by:
Hello folks, I was trying to set some environment variable for a process I create. (The variables are my own, not system). I use SetEnvironmentVaraible() from C# code. In Debug configuration...
by: jim | last post by:
I am trying to debug a user written web control and web control designer. I found an article “Building Windows Forms Controls and Component with Rich Design-Time Features” that describes how...
by: Brett | last post by:
For some reason when I step into the code below, it jumps out on the second iteration at the line I have marked below. Nothing else happens - no errors. Dim tcpClient As New...
by: adhingra | last post by:
I stumbled upon something which does not make sense "Debug class methods are not automatically suppressed by the managed c++ compiler when the project is build in release mode" Create a a...
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
by: caa | last post by:
Hi there, people! I m working on a c# control. Using VS2003 and writing for .NET 1.1. I wrote an app that automaticly opens and closes (after a random Sleep) forms that own one instance of my...
by: veer | last post by:
Hi i am getting probleum in running the exe on any other location on my computer except bin\debug when i execute the exe file which is in bin\debug folder it works fine and when i copy this exe and...
by: =?Utf-8?B?RmFiaWFu?= | last post by:
Hi, I have a pretty complicated program which consists of the following basic modules: 1. a C# application 2. a C++/CLI application which is controlled by the C# app via IPC remoting 3. lots...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.