473,395 Members | 1,885 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,395 software developers and data experts.

Debug, Inheritied forms?

Hi.

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?

Regards
Fredrik Melin
Nov 20 '05 #1
1 963

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.
Sincerely,

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

1
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....
10
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...
4
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...
10
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...
1
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...
6
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++...
0
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...
5
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...
6
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

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.