<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to debug a generic method</title><link>https://www.aras.com/community/f/development/3103/how-to-debug-a-generic-method</link><description>Hi, 
I do my fair share of developing in .net and use remote debugging in Visual Studio to that end. This works fine, until we come to generic methods.

When my code enters the applyMethod() like so
 
var body = &amp;quot;&amp;lt;Item type=&amp;#39;Method&amp;#39; action=&amp;#39;gen_GetRequestFromActivity</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to debug a generic method</title><link>https://www.aras.com/community/thread/61?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2016 15:07:43 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:0e25faad-d78f-4e1d-b5ce-35d5a5890643</guid><dc:creator>Dennis Lindinger</dc:creator><description>Is your generic method compiling correctly in the method editor?

Instead of System.Diagnostics.Debugger.IsAttached in the generic method, try System.Diagnostics.Debugger.Launch().

I&amp;#39;ve never had a problem breaking in a generic method.

Dennis&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug a generic method</title><link>https://www.aras.com/community/thread/34?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 11:40:00 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:5db0f4fc-ab27-4b4c-a28a-af67a06f2e1b</guid><dc:creator>Eli Donahue</dc:creator><description>Hi Carsten,

Try the following steps after restarting IIS.

1. Open &amp;quot;Microsoft Visual Studio .NET 2012&amp;quot; debugger. 
2. Choose Tools --&amp;gt; Attach to Processes….  
3. Choose w3wp.exe and click &amp;#39;Attach&amp;#39;.  
4. Choose Debug --&amp;gt; Exceptions to force the method into the debugger when an exception occurs and choose the check boxes &amp;quot;Thrown&amp;quot;.  
5. Optionally, you can include the line System.Diagnostics.Debugger.Break() to force a breakpoint at a specific line in your method. 

Eli

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug a generic method</title><link>https://www.aras.com/community/thread/29?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 04:13:35 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:55e53bbe-f73c-4afb-8543-f2cf0e6ff53c</guid><dc:creator>carstenw</dc:creator><description>Hi Zahar,
thanks for your reply.

That key is already present in my InnovatorServerConfig.xml, and I am able to debug my other methods just fine.

The issue arises when I use the Innovator method applyMethod(&amp;quot;someMethod&amp;quot;, &amp;quot;someParameters&amp;quot;);
I would like to step into the someMethod() implementation, this is what is not working for me.

Are you yourself able to step into a method called this way?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug a generic method</title><link>https://www.aras.com/community/thread/28?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2016 10:54:24 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:8f50b825-640d-4c5a-9493-b08eea79373e</guid><dc:creator>Zahar Chernov</dc:creator><description>To enable debugger, you need to:

&lt;ol&gt;
	&lt;li&gt;add following key to InnovatorServerConfig.xml
&lt;code&gt;&amp;lt;operating_parameter key=&amp;quot;DebugServerMethod&amp;quot; value=&amp;quot;true&amp;quot; /&amp;gt;&lt;/code&gt;&lt;/li&gt;
	&lt;li&gt;restart the IIS&lt;/li&gt;
&lt;/ol&gt;

Be careful with this flag on Production environment, cause it can slow you production if you forgot to remove debugger from the code.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>