Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbols are unavailable in some Intel Fortran code. #8479

Closed
Ben136KBC opened this issue Dec 2, 2021 · 6 comments
Closed

Symbols are unavailable in some Intel Fortran code. #8479

Ben136KBC opened this issue Dec 2, 2021 · 6 comments

Comments

@Ben136KBC
Copy link

Ben136KBC commented Dec 2, 2021

Attached a folder which can be unzipped (I had it as f:\ConsoleApplication1). It contains one C++ file compiled via Visual Studio 2019, and one Fortran file compiled via Intel Fortran, all native Windows code using OBJ / PDB file format, and linked together using the Microsoft linker (code is in the root directory, exe and obj and pdb files are in the X64\Debug subdirectory). The C++ code calls into the Fortran code. Running on Windows 11, x64, native code.

It uses the C/C++ extension and then the Modern Fortran extension (https://github.com/krvajal/vscode-fortran-support). "Modern Fortran does not have a debug adapter of its own, we plug in to Microsoft's C/C++ extension Debug component. We rely on the fact that C++ debuggers understand Fortran".

The Visual Studio Code version and installed extensions is shown below.

Open the top folder in Visual Studio Code. If you put a breakpoint in the Fortran file in test, it hits it and you can local variables and NOPROP. See ConsoleApplication1.png.

However, now put a breakpoint in the larger method, see ConsoleApplicaiton3.png. Now you cant see any variables.

If you debug this using Visual Studio 2019 with Intel Fortran, you can see all the variables.

Can you please investigate? Please help!

Install the C/C++ extension, the Modern Fortran extension. Pretty much all of the symbol information gets handled by the C/C++ extension. Perhaps it just needs a few minor tweaks to handle the Fortran symbols?

PLEASE?

ConsoleApplication1
ConsoleApplication2
ConsoleApplication3
ConsoleApplication4

ConsoleApplication1.zip

@WardenGnaw
Copy link
Member

Can you add the following to your launch.json and share the output in the Debug Console?

"logging": {
   "engineLogging": true
}

@WardenGnaw WardenGnaw added debugger more info needed The issue report is not actionable in its current state labels Dec 2, 2021
@Ben136KBC
Copy link
Author

Ben136KBC commented Dec 2, 2021

Here is the log file.

DebugLog.txt

Note that in some cases it shows all the local variables fine (but for the same project sometimes not, see earlier screen shot of the same breakpoint, you just see "error processing variables request"), see this screen shot, but the watch and flyby windows cant identify the variable. Seems fishy, if the local variables can find and show it, why not the watch window?

Please note the entire project is attached earlier, so you can reproduce and investigate.

image

@WardenGnaw WardenGnaw added investigate: repro This issue's repro steps needs to be investigated/confirmed and removed more info needed The issue report is not actionable in its current state labels Dec 2, 2021
@WardenGnaw
Copy link
Member

Ah. I missed this statement.

If you debug this using Visual Studio 2019 with Intel Fortran

The Visual Studio Debugger uses Intel Fortran as an Expression Evaluator to see if they could resolve the expression.

This would be on Intel Fortran creating an EE as a Concord extension in VS Code.

See https://github.com/microsoft/ConcordExtensibilitySamples/wiki/Support-for-VS-Code-cppvsdbg-Scenarios

@WardenGnaw WardenGnaw added external and removed investigate: repro This issue's repro steps needs to be investigated/confirmed labels Dec 2, 2021
@Ben136KBC
Copy link
Author

The symbols are all already inside the PDB and OBJ file, very often you see the local variables, see screen shot in the my last comment, but sometimes it just gives an error. Which tells me it so almost works as is, just a small tweak may be required somewhere. I can't see in this extension where it handles the Watch window expressions and evaluates them? The modern fortran extension pretty much just relies on the cppvsdbg extension. if I wanted to debug this, where in this extension would I put a breakpoint? (Intel will not develop an extension for Visual Studio Code.)

@WardenGnaw
Copy link
Member

Unfortunately, cppvsdbg is not open-sourced. It is shipped with the VS Code extension to allow debugging support for MSVC.

This is up to Intel to decide if they wish to ship their EE as a Concord Extension to VS Code.

In the meantime, this scenario is only fully supported in Visual Studio with the Intel Fortran extension.

@github-actions
Copy link

github-actions bot commented Dec 3, 2021

This issue has been closed automatically because it's labeled as 'external'.

@github-actions github-actions bot closed this as completed Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants