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

Debugging an exe invoked from a script

mattp
Beginner
660 Views
I am porting a number of applications to the PC from a DEC Alpha, and most are wrapped by a script of some sort (mostly DCL COM files, but some unix scripts). On the PC the scripts will be re-written in perl or maybe simple *.bat, but will still wrap the application. I want to use the CVF debugger, but I need the debugger to fire the script (which runs the debug exe) because some of these scripts do significant set-up activity, and act as "glue" transferring data between applications.

I am working with a small sample program wrapped by a *.bat. My first attempt to do this was to modify the project Debug settings to use Cmd.exe as the executable for the debug session, specifying the *.bat as the argument. This results in the execution of the *.bat, which does runs the application debug exe, but the environment doesn't catch breakpoints in the application.

Can anybody suggest an alternative approach? Is there a facility for starting the code outside the environment using the script, and then attaching the debugger to the running exe? Or (preferably) is there a way to run the script from within the environment, while specifying to the environment the exe to debug? Thanks for any help, Matt
0 Kudos
3 Replies
Steven_L_Intel1
Employee
660 Views
Have your .BAT file invoke "DFDEV.EXE yourworkspace.DSW" - this will load your workspace with the environment set up and you can start the program in the debugger. You'll need to start from a "Fortran Command Prompt" window.

Steve
0 Kudos
mattp
Beginner
660 Views
Steve, Thank you, thats exactly what I needed. You've saved me a lot of time.

Matt
0 Kudos
Intel_C_Intel
Employee
660 Views
This will be helpful for me too, Steve. Thanks indeed!

Tom
0 Kudos
Reply