Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29276 Discussions

Unable to debug ServerCom (from c# unit tests)

pellea
Beginner
802 Views
Hello,

I'm trying to debug the code written in fortran when I execute unit tests from C# but it doesn't works.

I put a breakpoint in the ServerCom constructor and in Fotran routine that I'm using.


Is it possible to debug a ServerCom and how?


Thanks,
Pellea.
0 Kudos
4 Replies
anthonyrichards
New Contributor III
802 Views
With your Fortran project displayed in Visual Studio, select the Project Property pages.
When that opens, select the debug configuration and on the left, under 'configuration properties' select 'Debugging. The window on the right should then have, 'Command' as its first line under under 'Action'.
Type in here the full path to the C# executable that calls your Fortran. When you start Debug, this executable will start. When the C# calls the Fortran, you should then be able to stop at breakpoints within the Fortran and debug the Fortran (provided you are using the debug configuration).

0 Kudos
pellea
Beginner
802 Views
It is what I usually do when debugging "not server com" application and it works fine. But in my case it doesn't works with the ServerCom project and I don't know why.
0 Kudos
anthonyrichards
New Contributor III
802 Views
Describe exactly what you do and exactly what happens. Give details.



Holmes: 'Watson, When you have eliminated the impossible, whatever remains, however improbable, is the answer'

Watson: 'Clearly you have never programmed a calculator, Holmes!'
0 Kudos
pellea
Beginner
802 Views
I passed to the debugging tab of the fortran project a nunit-console.exe with the right arguments to run my test (the test contains a call to the fotran routine from the servercom). But it seems that nunit setup an environment that cannot be understood by the intel compiler integration in VS2008.

Then, I created a new console application (this is not anymore a dll but an exe) in C# that have the same code of my unit tests. Instead of executing the nunit-console.exe, I start my new console app and it works.

The issue is partially solved. I acheived what I wanted to do but not in the right manner.

0 Kudos
Reply