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

Debugging C++/Fortran DLL called from a .NET application

Stephen_Painchaud
269 Views
I have a DLL that is mostly Fortran with a thin C++ wrapper. I would like to debug the code from a C# .NET application that uses it. Unfortunately the debugger wont let me step into the DLL. I thought maybe setting the DLL as the startup project would allow me to debug it. I am unable to test this idea because the application will not start up due to write permission errors. Having admin status seems to give me no ability to change permissions on my files.

Is there some other way I can debug the DLL from the application? The DLL project is part of the application solution.
0 Kudos
1 Solution
DavidWhite
Valued Contributor II
269 Views
I have a DLL that is mostly Fortran with a thin C++ wrapper. I would like to debug the code from a C# .NET application that uses it. Unfortunately the debugger wont let me step into the DLL. I thought maybe setting the DLL as the startup project would allow me to debug it. I am unable to test this idea because the application will not start up due to write permission errors. Having admin status seems to give me no ability to change permissions on my files.

Is there some other way I can debug the DLL from the application? The DLL project is part of the application solution.
Stephen,

Set a breakpoint on the first line in the DLL application.

Under the Project Properties, Configuration Properties, Debugging, Command, type in the command required to start up the .Net application. You can also set commandline arguments and working folder.

The from VS, when you start debugging the application, the .Net application should start, and then stop at the break point in your DLL.


Regards,


David

View solution in original post

0 Kudos
1 Reply
DavidWhite
Valued Contributor II
270 Views
I have a DLL that is mostly Fortran with a thin C++ wrapper. I would like to debug the code from a C# .NET application that uses it. Unfortunately the debugger wont let me step into the DLL. I thought maybe setting the DLL as the startup project would allow me to debug it. I am unable to test this idea because the application will not start up due to write permission errors. Having admin status seems to give me no ability to change permissions on my files.

Is there some other way I can debug the DLL from the application? The DLL project is part of the application solution.
Stephen,

Set a breakpoint on the first line in the DLL application.

Under the Project Properties, Configuration Properties, Debugging, Command, type in the command required to start up the .Net application. You can also set commandline arguments and working folder.

The from VS, when you start debugging the application, the .Net application should start, and then stop at the break point in your DLL.


Regards,


David
0 Kudos
Reply