<p>When an ASP.NET application errors out and generates the yellow-screen display, I'd like to create some kind of link from the error page which would jump directly to the correct line of code in Visual Studio.</p>

<p>I'm not sure how to approach this, or if there are any tools already in existence which accomplish it - but I'd love some feedback on where to start.</p>

<p>In the event that generating a new error page is necessary, is it possible to replace the standard yellow screen across an entire webserver, rather than having to configure the customized error output for each application?</p>

[{'answer_id': 20589, 'author': 'Eric Z Beard', 'author_id': 1219, 'author_profile': 'https://Stackoverflow.com/users/1219', 'pm_score': 2, 'selected': True, 'text': '<p>You would probably need to embed an ActiveX control in the page for something like that to be possible.</p>\n'}, {'answer_id': 27163, 'author': 'FlySwat', 'author_id': 1965, 'author_profile': 'https://Stackoverflow.com/users/1965', 'pm_score': 0, 'selected': False, 'text': '<p>The yellow screen of death is served by the default ASP.NET HTTPHandler.</p>\n\n<p>In order to intercept it, you would need to add another HTTPHandler in front of it that intercepts all uncaught exceptions.</p>\n\n<p>At that point, you could do whatever you want for your error layout.</p>\n\n<p>Creating a way to directly jump to Visual Studio would be tricky. I could see it done in IE via a COM/ActiveX object.</p>\n'}, {'answer_id': 27169, 'author': 'Adam Davis', 'author_id': 2915, 'author_profile': 'https://Stackoverflow.com/users/2915', 'pm_score': -1, 'selected': False, 'text': '<p>The easiest, laziest thing I could think of would be to have the process happen thusly:</p>\n\n<ol>\n<li>The yellow screen is modified so the line is source code is clickable.  When clicked it delivers a small text file with the source file name and line number.</li>\n<li>A small program on the PC is tied to the extension of the small file the yellow screen let you download.  The program uses visual studio\'s extensibility model to open the source file and goto that line.  The program may need to know where your source code is.</li>\n</ol>\n\n<p><a href="http://www.google.com/search?q=visual%20studio%20command%20line%20goto%20line" rel="nofollow noreferrer">A simple Google search</a>\ngives helpful pointers on how to manipulate VS with an external program <a href="http://forums.msdn.microsoft.com/en-US/vsx/thread/edd14ab3-ef81-4712-ae6b-5af2db487de2/" rel="nofollow noreferrer">such as this post on MSDN</a>.</p>\n\n<p>If you want to go snazzier, then there are certainly other methods, but I\'d rather write out a quick and dirty program, and get it out of my way so I can be about my business.</p>\n\n<p>Don\'t let the tools become projects...</p>\n\n<p>-Adam</p>\n'}, {'answer_id': 27173, 'author': 'jonezy', 'author_id': 2272, 'author_profile': 'https://Stackoverflow.com/users/2272', 'pm_score': 0, 'selected': False, 'text': '<p>The yellow screen of death is just a 500 error as far as the server is concerned, you can redirect to a custom screen using the error section of the web.config.  To make a whole server change in the same manner you could probably override it at the iis level?  Or perhaps even set the default behaviour in the machine.config file (not 100% sure about that one though)</p>\n'}, {'answer_id': 27174, 'author': 'FlySwat', 'author_id': 1965, 'author_profile': 'https://Stackoverflow.com/users/1965', 'pm_score': 0, 'selected': False, 'text': '<blockquote>\n  <p>The yellow screen of death is just a 500 error as far as the server is concerned, you can redirect to a custom screen using the error section of the web.config. To make a whole server change in the same manner you could probably override it at the iis level? Or perhaps even set the default behaviour in the machine.config file (not 100% sure about that one though)</p>\n</blockquote>\n\n<p>If you let it bubble up all the way to IIS you will not have any way to access the Exception information. Its better to catch the Exception before the YSOD and serve your own.</p>\n\n<p>This can be done at the application level.</p>\n'}, {'answer_id': 27234, 'author': 'Daniel Pollard', 'author_id': 2758, 'author_profile': 'https://Stackoverflow.com/users/2758', 'pm_score': 0, 'selected': False, 'text': "<p>Don't forget that you need the Program Debug Database (pdb) file to find the source code line number. An application in release mode won't have the same level of information as a debug release.</p>\n"}]
['https://Stackoverflow.com/questions/20575', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2104/']