Select to view content in your preferred language

Difficultly Debugging an automated ArcMap extension

861
3
Jump to solution
12-11-2013 11:29 AM
CraigPatterson
Regular Contributor
I'm developing a console application that launches ArcMap and executes a custom developed extension. The idea is that the the extension will be able to be scheduled to run in the off hours. The console app and extension work great most of the time but from time to time it throws errors. I'd like to be able to step through the extension's code when ArcMap is launched via the console application but I can't figure how to do so.

I can step through the console application's code. If I launch the extension via VS, I can step through it's code. I just can't step through the extension's code when launched via the console. I think the problem is that since I creating the ArcMap instance within the console app, it's treating the extension as an external DLL, even though the source code is in the same solution.

Is anyone aware of any settings I can set to allow me to debug the extension?

Thanks!

Craig
0 Kudos
1 Solution

Accepted Solutions
3 Replies
NeilClemmons
Honored Contributor
So I'm guessing that your console app passes some set of parameters to methods on your extension?  If you want to debug that code with those inputs then add a test project to your solution and set up a unit test that calls the method with those inputs.
0 Kudos
RichardWatson
Deactivated User
0 Kudos
CraigPatterson
Regular Contributor
Thanks Richard. That did the trick!

Craig
0 Kudos