Skip to content

Commit 81a0542

Browse files
authored
Merge pull request #665 from fortran-lang/bug/debug
Improvements on Run and Debug buttons
2 parents 33a346b + 1ede7d7 commit 81a0542

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@
628628
"command": "fortran.build.debug",
629629
"group": "navigation@1",
630630
"title": "Debug Fortran File",
631-
"when": "resourceLangId == fortran && !isInDiffEditor && !virtualWorkspace && shellExecutionSupported"
631+
"when": "resourceLangId =~ /Fortran/ && !isInDiffEditor && !virtualWorkspace && shellExecutionSupported"
632632
}
633633
]
634634
}

src/features/linter-provider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export class FortranLintingProvider {
296296
program: `${textDocument.fileName}.o`,
297297
cwd: folder.uri.fsPath,
298298
};
299-
await vscode.debug.startDebugging(folder, selectedConfig, { noDebug: debug });
299+
await vscode.debug.startDebugging(folder, selectedConfig, { noDebug: !debug });
300300
return;
301301
} catch (err) {
302302
this.logger.error(`[build] Compiling ${textDocument.fileName} failed:`, err);
@@ -417,7 +417,8 @@ export class FortranLintingProvider {
417417
*/
418418
private getLinterExtraArgs(): string[] {
419419
const config = vscode.workspace.getConfiguration(EXTENSION_ID);
420-
let args: string[] = this.linter.argsDefault;
420+
// Get the linter arguments from the settings via a deep copy
421+
let args: string[] = [...this.linter.argsDefault];
421422
const user_args: string[] = this.settings.args;
422423
// If we have specified linter.extraArgs then replace default arguments
423424
if (user_args.length > 0) args = user_args.slice();

src/lib/linters.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,28 @@ abstract class Linter {
1414
/**
1515
* Linter name
1616
*/
17-
public name: string,
17+
public readonly name: string,
1818
/**
1919
* Regular expression to match compiler messages
2020
*/
21-
public regex: RegExp,
21+
public readonly regex: RegExp,
2222
/**
2323
* Keywords used to identify message severity
2424
*/
25-
public severity: LinterSeverityKeywords,
25+
public readonly severity: LinterSeverityKeywords,
2626
/**
2727
* Mandatory linter arguments. These are always present
2828
*/
29-
public args: string[],
29+
public readonly args: string[],
3030
/**
3131
* Command line arguments to pass to the linter, these get overwritten in
3232
* case the user has set arguments in the settings
3333
*/
34-
public argsDefault?: string[],
34+
public readonly argsDefault?: string[],
3535
/**
3636
* Compiler flag used to change the directory output for modules
3737
*/
38-
public modFlag?: string
38+
public readonly modFlag?: string
3939
) {}
4040

4141
public getSeverityLevel(msg_type: string): vscode.DiagnosticSeverity {

0 commit comments

Comments
 (0)