| Author |
Message |
adkamdar
Joined: 30 Sep 2010 Posts: 2
|
Posted: Thu Sep 30, 2010 4:58 pm Post subject: Navigate to line of code where event was generated |
|
|
Hello,
Is there a way to navigate from an event marker displayed in the events bar to the line of code which generated the event?
Assuming the method source is available, I have noticed that clicking on an event in the event bar highlights the method from which the event was generated, and also displays the method source code in the source code pane. But I haven't yet been able to figure out how to get to the specific line of code in that method that caused the event, even when profiling with line level timings.
Thanks.
Ajay |
|
| Back to top |
|
 |
StephenC
Joined: 15 Oct 2007 Posts: 314 Location: Cambridge
|
Posted: Thu Sep 30, 2010 5:38 pm Post subject: |
|
|
If I've understood correctly the only way you can sort of achieve what you are looking for is when you put the .SignalEvent("my message") into your code you simply read what the message is from the tooltip placed on the event bar.
Apart from marking key signal events with a different message to act as unique identifiers there's no other way to jump to a line of code, only methods.
Regards,
Stephen |
|
| Back to top |
|
 |
adkamdar
Joined: 30 Sep 2010 Posts: 2
|
Posted: Thu Sep 30, 2010 5:48 pm Post subject: |
|
|
Hi Stephen,
In my case the event is actually an invalid operation exception that gets thrown very sporadically, and could possibly be coming from a couple of different places in the same method. So I was hoping to jump straight to the line of code that caused it without having to instrument the code. But in any case, thanks for your quick response.
Regards,
Ajay |
|
| Back to top |
|
 |
StephenC
Joined: 15 Oct 2007 Posts: 314 Location: Cambridge
|
Posted: Thu Sep 30, 2010 6:04 pm Post subject: |
|
|
You might want to give our exception hunter tool a try,
http://www.red-gate.com/products/Exception_Hunter/index.htm
Take a look at the walkthrough and demo to see if might help.
It can identify lines where particular exceptions can be thrown. You might be able to identify the problem or at least narrow the problem down.
Stephen |
|
| Back to top |
|
 |
simon.jackson
Joined: 08 Jan 2009 Posts: 45
|
Posted: Fri Oct 01, 2010 9:02 am Post subject: |
|
|
Another option is to attach the Visual Studio debugger and put exception catch on only for InvalidOperationException.
[Ctrl + Alt E] |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group