Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Debbuging a DLL

hgr_iwf
Beginner
722 Views
Hello!

Is it possible to debug a dll or generate a core dump file in windows? I call the Fortran-dll from IDL (interactive data language). I need it because my written dll crashes anywhere and anytime.


I hope, that someone can help me.

Thanks, Hannes
0 Kudos
6 Replies
Steven_L_Intel1
Employee
722 Views
Yes. Right click on your DLL project and select Properties, Debugging. In the path to execute, put the path to the EXE that calls your DLL. Set a breakpoint in your DLL routine(s) and then press F5 to start debugging. Your program will load, and when it calls the DLL the breakpoint will be hit.

Make sure that the DLL being invoked is the Debug build result.
0 Kudos
hgr_iwf
Beginner
722 Views
Yes. Right click on your DLL project and select Properties, Debugging. In the path to execute, put the path to the EXE that calls your DLL. Set a breakpoint in your DLL routine(s) and then press F5 to start debugging. Your program will load, and when it calls the DLL the breakpoint will be hit.

Make sure that the DLL being invoked is the Debug build result.

Thanks for your help, but I get following error message, when I press F5 to start debugging:
"Visual Studio cannot debug because a debug target has not been specified."

Is it correct, when I set in the Debugging Properties of my DLL project in the Field "Working Directory" my path where I copied my dll into the folder where my exe-file is located? And I only have to copy the debug dll in the folder where the exe-file is located?

Have I to do other settings?

Thanks, Hannes
0 Kudos
DavidWhite
Valued Contributor II
722 Views
Quoting - hgr_iwf

Thanks for your help, but I get following error message, when I press F5 to start debugging:
"Visual Studio cannot debug because a debug target has not been specified."

Is it correct, when I set in the Debugging Properties of my DLL project in the Field "Working Directory" my path where I copied my dll into the folder where my exe-file is located? And I only have to copy the debug dll in the folder where the exe-file is located?

Have I to do other settings?

Thanks, Hannes

Hannes,

I haven't tried this, but I think you would be better using the debug version of the DLL insitu in the folder where it was created through Visual Studio. Add this folder to your PATH so that the .exe file can find it.

I think this will work better than trying to move the DLL, or elase VS won't know where it (and other files it needs) are.

Regards,

David
0 Kudos
Steven_L_Intel1
Employee
722 Views
Sorry, I misremembered the field to set. It is "Command" under Debugging. Put the full path to the executable there.
0 Kudos
hgr_iwf
Beginner
722 Views
Sorry, I misremembered the field to set. It is "Command" under Debugging. Put the full path to the executable there.

Is it only possible to debug it with an exe-file? The problem is that I cannot generate an exe-file. I only can execute my source code with the programming environment of IDL.

kind regards,
Hannes
0 Kudos
Steven_L_Intel1
Employee
722 Views
Put in the path to the EXE that starts the IDL environment.
0 Kudos
Reply