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

Invoke Debugger from Command Prompt

Chris_H_3
Beginner
431 Views

Is there a way to call a program that I have compiled so that it launches in a debugger session like in VS2015?

0 Kudos
6 Replies
Kevin_D_Intel
Employee
431 Views

I haven't done anything like this before and I’m not sure this is really what you’re looking for but you can launch debugging of an executable under the MS IDE via the command-line with: devenv /debug <executable>

0 Kudos
Chris_H_3
Beginner
431 Views

Thank you for the suggestion Kevin D.  I was able to launch the solution using devenv /debug name.sln.  Using the executable name did not work; however, the project did not start running when VS2015 launched.  My goal is to get the project to launch and begin running in debug mode with command line arguments that I provide when I start VS2015.  I'm still looking.

 

0 Kudos
Steve_Lionel
Honored Contributor III
431 Views

Kevin's suggestion is correct - add /run if you want it to start automatically. If you want to set a breakpoint, use the File menu to open a source file  (when you open without /run) and you can then set one there.

0 Kudos
Chris_H_3
Beginner
431 Views

Thanks, Steve.  It works when I'm in a command prompt launched in the Intel group IA-32 Visual Studio 2015 environment.  What is the batch file that runs to get all the paths set up for this?  Using devenv /debug /run progname.sln  works in that environment.  All I need is to set up the right paths and get Microsoft to tell me whether a solution will feed a console app command line arguments as is done when debugging inside the studio.  Thank you for the help.

0 Kudos
mecej4
Honored Contributor III
431 Views

Locate the shortcut in the Start menu that launched the IFort command window; instead of left-clicking to launch it, do a right-click and select "Properties". Under "Target" you fill find the path of the batch file that you can call from your own batch scripts or from the command window.

0 Kudos
Steve_Lionel
Honored Contributor III
431 Views

I would suggest:

call  "%IFORT_COMPILER17%\bin\ipsxe-comp-vars.bat" intel64

(or ia32 instead of intel64 for 32-bit)

0 Kudos
Reply