Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 874401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:05:55+00:00 2026-05-15T11:05:55+00:00

I have a nice tidy way of capturing unhandled exceptions which I display to

  • 0

I have a nice tidy way of capturing unhandled exceptions which I display to my users and (optionally) get emailed to myself. They generally look something like this:

Uncaught exception encountered in MyApp (Version 1.1.0)!

Exception:
   Object reference not set to an instance of an object.
Exception type:
   System.NullReferenceException
Source:
   MyApp
Stack trace:
   at SomeLibrary.DoMoreStuff() in c:\projects\myapp\somelibrary.h:line 509
   at SomeAlgothim.DoStuff() in c:\projects\myapp\somealgorithm.h:line 519
   at MyApp.MainForm.ItemCheckedEventHandler(Object sender, ItemCheckedEventArgs e) in c:\projects\myapp\mainform.cpp:line 106
   at System.Windows.Forms.ListView.OnItemChecked(ItemCheckedEventArgs e)
   at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
   at System.Windows.Forms.ListView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Is it possible to launch visual studio and have it open c:\projects\myapp\somelibrary.h on the offending line and if so, how?

I’d also like to do this from the (html) email I generate if that’s possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:05:55+00:00Added an answer on May 15, 2026 at 11:05 am

    You can automate Visual Studio, using for example VBScript:

    filename = Wscript.Arguments(0)
    lineNo = Wscript.Arguments(1)
    
    ' Creates an instance of the Visual Studio IDE.
    Set dte = CreateObject("VisualStudio.DTE")
    
    ' Make it visible and keep it open after we finish this script.
    dte.MainWindow.Visible = True
    dte.UserControl = True
    
    ' Open file and move to specified line.
    dte.ItemOperations.OpenFile(filename)
    dte.ActiveDocument.Selection.GotoLine (lineNo)
    

    Save this as say debugger.vbs and run it, passing the filename and line no as command line args:

    debugger.vbs c:\dev\my_file.cpp 42
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to have a nice, tidy way of expressing the following java code
I don't have nice short code examples to display with this post. I'm running
I want to replace some headers by images, so I would have nice font.For
have a nice day. I got problem when trying to create an image from
Have a nice day everyone, I have something to ask your hel, to better
I have a nice dataset loop working, but I need to run another loop
I have a nice question about the loop-expression of a for-loop in C#. I
I have a nice clean domain layer in my app that was developed in
I have a nice DataGridView showing what is basically some kind of log data
I have a nice page that does everything I need. However one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.