Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > How to debug runtime error in visual studio .net
 

How to debug runtime error in visual studio .net

I have developed a vb.net windows application which is working fine in visual studio but when I create an application setup it will give me run time error.

How can I debug this run time error in visual studio ?

Please help me. :)

Thanking you in advance
Furqanms  Saturday, December 27, 2008 8:08 PM

Hi Furqanms,

You can use Debugger.Break method to add breakpoint that can be hit in run time. So you can attach Visual Studio to debug the source code.
You can add this method before Application.Run is called.

Here is the reference
http://msdn.microsoft.com/en-us/library/system.diagnostics.debugger.break.aspx

Sincerely,
Kira Qian


Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Wednesday, December 31, 2008 2:07 AM

Hi Furqanms,

I want to know more information about your problem.

1. Which version of .net did you use?
2. Which version of Visual Studio did you use?
3. Who did you create your Setup project and add project output? Did you use custom action?
4. When did you meet the error message? In the installation process or at the time when you start your application?

Please let me know these information in order to find a solution.

Sincerely,
Kira Qian


Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Monday, December 29, 2008 7:13 AM
It is as follow

1. .Net 3.5
2. Visual Studio 2008 Professional
3. I have added project outputs. I am not using custom action
4. When I start application I am getting the error ( I am using managed and unmanaged code in the application )


Thanks
Furqanms  Tuesday, December 30, 2008 12:57 PM

Hi Furqanms,

You can use Debugger.Break method to add breakpoint that can be hit in run time. So you can attach Visual Studio to debug the source code.
You can add this method before Application.Run is called.

Here is the reference
http://msdn.microsoft.com/en-us/library/system.diagnostics.debugger.break.aspx

Sincerely,
Kira Qian


Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Wednesday, December 31, 2008 2:07 AM

You can use google to search for other answers

Custom Search

More Threads

• Embedding MSDE 2000, .NET Framework, MDAC, Internet Explorer
• Installing database with setup project
• Install files to user's local application data with Visual Studio Installer
• ClickOnce Installs fail, ADODB 7.0.3300 required?!
• Visual Studio setup project treats each file as separate component
• run file after setup
• ClickOnce Certificates
• Remove Previous Version does not work
• No Touch Deployment Not Working
• Yet Another Expired Certificate Question(s).