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.
29282 Discussions

Remote Debugging Fortran Code within Visual Studio

ratzeputz
Beginner
2,373 Views
Hi there.

Just a simple Question.

Is there any way to remote debug Fortran Code directly within Visual Studio?
Were using VS2008.

I can remote debug my .NET applications without any problem.
Using the Visual Studio Remote Debugger on the remote host and attaching to the process from the client host is working like a charm.

With Fortran it does not work. I cant set stop points because they are not recognized by the remote debugger (i copied the .pdb file already to the remote host).

Do you have any ideas or solutions to get that working?

Best regards
Oliver
0 Kudos
8 Replies
Steven_L_Intel1
Employee
2,373 Views
I have never used this before but I tried it and could not get it to work. I didn't get as far as you did - I could attach to Visual Studio, but couldn't do anything. If I started my program in the debugger, it would not let me attach. How did you get to attach to the program?
0 Kudos
jimdempseyatthecove
Honored Contributor III
2,373 Views
Oliver, I haven't done remote debugging in a while, from what I remember

The remote machine is the one that will execute your program and the local machine is your development (one with sources).

You build a Debug version on the local machine, copy the .exe (and .dll's it may use, and input files, etc...) to the target machine. To aid in debugging the app is written to start up with a

Press any key to continue

Or some dialog box or input promptetc..

Then, on the remote machine you run the app and do not answer the prompt.
On the host machine, perform an attach to process using a \\system\app
After initial break, set your break points, continue, then from remote machine answer the prompt (e.g. Enter).

Remote debugging may have change significantly since I did this back in the late 90's

Jim

0 Kudos
ratzeputz
Beginner
2,373 Views
@ Steve:
Ihave recognized is, that Microsoft is really shootin in at their domain services.
So its fundamental, that your remote machine is at the same domain as your debug client is.
Otherwise there are a plenty of options for setting up the remote debugger software to run without domain.
What i have done is, that i created a user with a password on the remote machine and add them to the administrators group. Then i startet the remote debug software from command line using "runas /user:debuguser msvmon.exe" and the application which i want to debug too.

At the debug client i created the same user and startet visual studio also from command line with "runas /user:debuguser devenv.exe" and the dialog window where you can attach at the processes you have to select "default" for the transport and the user@domain combination which the remote debug software writes on the remote machine. debuguser@TESTMACHINE for example.

i checked the "Select processes from all users" box too and my programm is listet there and can be attached.

At a .NET application it works like a charm and i can use stoppoints. but as i said before, for fortran code it aint working. Attaching yes, stoppoints or value reading no
0 Kudos
ratzeputz
Beginner
2,373 Views
@Jim:
Thats nearly the way i tried before and it dont work.
No stoppoints can be reached.

The only difference is, that i used the remote debug software and it seems that you did not in your explaination.
0 Kudos
ratzeputz
Beginner
2,373 Views
Hey Guys. I have done it.

It is so simple that i tried it least :)

First of all the remote debug software has to be set up as i explained before.
Make sure that you use the right version (x86 or x64) and that the Folder, where your .exe file you want to be debugged is located in is accessable over network from the user you uses at the remote and the client side.

In my case the debug user is called debuguser and has read/write/execute rights on a folder on the remote machine where my testprogramm.exe is located.
I copied all .dll and .pdb files in this folder too.

Then head for the project properties on your debug client where visual studio is running (make sure the same user is running visual studio as you want to debug with).
There is a section which is called "Debugging". At the bottom there is a region which is called "Remote Settings" and at connection "Local Only" is set by default.
Change this to "Remote with Windows authentication" and at "Remote Server Name" you have to insert the value which is the remote debug software on the remote machine is listing. In my case its debuguser@TESTMACHINE.
At "Remote Command" just insert the path to the .exe file where the programm is located at the remote machine. In my case "c:\Debug\testprogramm.exe"

Now, when you start debugging on visual Studio you sould see your programm starting on the remote machine and if you set any stoppoints they will be reached now :)
Values can also be read out :)

Such an easy way isnt it?
0 Kudos
Steven_L_Intel1
Employee
2,373 Views
I am glad you found the answer. I will try some experiments and see if I can write up instructions for a Knowledge Base article. Thanks!
0 Kudos
ratzeputz
Beginner
2,373 Views
I wrote a tutorial for the members of our company.
I can send it to you if you want, but the tutorial is in german. If this doesnt matter then let me know :)
0 Kudos
Steven_L_Intel1
Employee
2,373 Views
Please do send it to me at steve.lionel at intel dot com. We have German-speaking specialists who can help me if I can't figure it out. Thanks.
0 Kudos
Reply