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

Run debugger from cover script?

fortuser
Beginner
617 Views
My program needs to be run from a perl cover script that sets up environment variables and an output directory. Is it possible to use the debugger with this script? I'm using Visual Studio 2008 on WindowsXP
0 Kudos
6 Replies
Steven_L_Intel1
Employee
617 Views
In the VS project properties under Debugging, set Command to be the command that invokes Perl and the command arguments to identify your script. Set a breakpoint in the program. Now click Start Debugging. It will run your Perl script and should break in the debugger when the program is run.
0 Kudos
fortuser
Beginner
617 Views
Thanks for reply.

I tried putting the path to perl script in the command and VS complained because it was not an EXE file. I then put the path to perl.exe in the command and put the perl script name and arguments in the Command Arguments line and VS said that it didn't have any debugging info for perl.exe. It did run my program, but not in the debugger.

0 Kudos
Steven_L_Intel1
Employee
617 Views
The message about not having debugging info I expect. Does your perl scrip run the exact EXE built by your project (and not a copy elsewhere)?
0 Kudos
fortuser
Beginner
617 Views
I tried it again pointing the cover script directly to the .exe file created by VS. It still failed to stop at the break points.
0 Kudos
Steven_L_Intel1
Employee
617 Views
The only other thing I can suggest is to replace the call to your program with "devenv solutionfile.sln" where 'solutionfile.sln' is your executable's solution. You can then debug from there. You may need to run Perl from a "Fortran build environment" command prompt to get devenv recognized.
0 Kudos
fortuser
Beginner
617 Views
In the meantime I found my problem the old fashioned way, with print statements. Perhaps someone who has already been through this can offer some suggestions. I don't have time right now to play around with it. I'll look into it further some other time.

Thanks
0 Kudos
Reply