Skip to content

Support gfortran debugger with debug adapter #89

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

Closed
krvajal opened this issue Oct 14, 2018 · 11 comments · Fixed by #183
Closed

Support gfortran debugger with debug adapter #89

krvajal opened this issue Oct 14, 2018 · 11 comments · Fixed by #183

Comments

@krvajal
Copy link
Collaborator

krvajal commented Oct 14, 2018

No description provided.

@starship863
Copy link

This is actually very easy, as shown by the extension "Fortran Breakpoint Support" by ekibun in this Repository .

No coding is actually needed, simply modify the package.json as following is enough.

  1. In the "categories" in package.json, add
    "Debuggers"
  2. In the "contributes" in package.json, add
    "debuggers": [
			{
				"type": "cppdbg",
				"label": "Fortran (GDB)",
				"enableBreakpointsFor": {
					"languageIds": [
						"FortranFreeForm", "fortran_fixed-form"
					]
				}
			}
		],

Then, automatically this extension will support debugging of fortran using gdb and the cppdbg type from vscode cpp extension.

Please check ekibun's extension for more details.

I have confirmed that this is working in my local machine, hope to see this feature official in this extension soon. @krvajal @pedro-ricardo Thank you very much!

@JHenneberg
Copy link

Yes correct. Does not make sense to install an extra extension.

@gnikit
Copy link
Member

gnikit commented Oct 5, 2019

I added this in PR #150 because having to manually edit the package.json every every time you install/update the extension it too fiddly in my opinion.

@juanfcocontreras
Copy link

Thank you very much for the modification @gnikit, however breakpoints still don't work for me in version 2.2.0.

In your PR you do the following in the "contributes" in package.json:

    "breakpoints": [
      {
        "language": "FortranFreeForm"
      },
      {
        "language": "fortran_fixed-form"
      }
    ],

To make it work I had to do what @starship863 says:

   "debuggers": [
			{
				"type": "cppdbg",
				"label": "Fortran (GDB)",
				"enableBreakpointsFor": {
					"languageIds": [
						"FortranFreeForm", "fortran_fixed-form"
					]
				}
			}
		],

@gnikit
Copy link
Member

gnikit commented May 21, 2020

Hi @juanfcocontreras the reason for using "breakpoints" instead of "debugger" is because the latter has been deprecated as far as I know. You can have a look at the C/C++ extension on how they register their debugging capability. Also you should keep in mind that the debugging capability has been included on the extension under the name Modern Fortran 2 (temporarily that is).

I did a fresh install of the Modern Fortran 2 extension, deleting also the .vscode/extension files and I cannot replicate this issue. Could you give that a try?

Thanks

@juanfcocontreras
Copy link

Thanks for your quick answer @gnikit, I was using Modern Fortran not Modern Fortran 2. Everything is working as you say.

Thank so much and sorry for the confusion!

@krvajal
Copy link
Collaborator Author

krvajal commented May 21, 2020 via email

@pedro-ricardo
Copy link
Collaborator

pedro-ricardo commented May 21, 2020

@krvajal Good to see you,
I'll remove the second extension from market place than

[Done]

@gnikit
Copy link
Member

gnikit commented May 21, 2020

I updated the original extension to the latest version today. So it should be working as well. Can you verify?

@krvajal a quick diff between the package.json of the 2 extensions shows the following differences:

3,4c3,4
< 	"displayName": "Modern Fortran 2",
< 	"description": "Apply new changes to the original extension by Miguel Carvajal. Same Repo, just a different publisher. Modern Fortran language support, including syntax highlighting and error detection.",
---
> 	"displayName": "Modern Fortran",
> 	"description": "Modern Fortran language support, including syntax highlighting and error detection.",
6c6
< 	"publisher": "pedro-ricardo",
---
> 	"publisher": "krvajalm",
91,98d90
< 		"breakpoints": [
< 			{
< 				"language": "FortranFreeForm"
< 			},
< 			{
< 				"language": "fortran_fixed-form"
< 			}
< 		],
156c148
< 					"description": "Enables or hover functionality (disable if using 'Fortran IntelliSense')"
---
> 					"description": "Enables hover functionality (disable if using 'Fortran IntelliSense')"

so currently the debugger functionality is not working in Modern Fortran

@juanfcocontreras
Copy link

juanfcocontreras commented May 21, 2020

I updated the original extension to the latest version today. So it should be working as well. Can you verify? Get Outlook for iOShttps://aka.ms/o0ukef

I actually updated the extension to version 2.2.0, and when I realized that breakpoints were not working, that's when I made the comment here. So I think that the new version of 'Modern Fortran', breakpoints don't work, as mention @gnikit.

@krvajal
Copy link
Collaborator Author

krvajal commented May 21, 2020

I see, taking a look now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants