Skip to content

Set createTempIntCon when creating launch config for Pester test #1209

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

Merged
merged 2 commits into from
Feb 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/features/PesterTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import vscode = require("vscode");
import Window = vscode.window;
import { IFeature, LanguageClient } from "../feature";
import { SessionManager } from "../session";
import Settings = require("../settings");
import utils = require("../utils");

export class PesterTestsFeature implements IFeature {
Expand All @@ -33,6 +34,7 @@ export class PesterTestsFeature implements IFeature {
private launchTests(uriString, runInDebugger, describeBlockName?) {
const uri = vscode.Uri.parse(uriString);
const currentDocument = vscode.window.activeTextEditor.document;
const settings = Settings.load();

const launchConfig = {
request: "launch",
Expand All @@ -47,6 +49,7 @@ export class PesterTestsFeature implements IFeature {
],
internalConsoleOptions: "neverOpen",
noDebug: !runInDebugger,
createTemporaryIntegratedConsole: settings.debugging.createTemporaryIntegratedConsole,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the setting only be used when runInDebugger is true? I could go either way

Copy link
Contributor Author

@rkeithhill rkeithhill Feb 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is benefit in being able to run tests in a fresh session. Yeah, the [DGB] in the terminal name is bit of a misnomer in this case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe if "runInDebugger" is false we can use a different title? That was short-sighted on my part

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe [TMP] PowerShell Integrated Console ??

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or [TEMP] just to be extra clear, but anything works

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish the VSCode folks would make this dropdown a tad wider:
image
What do you think?

cwd:
currentDocument.isUntitled
? vscode.workspace.rootPath
Expand Down
2 changes: 1 addition & 1 deletion src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export class SessionManager implements Middleware {
this.debugSessionProcess =
new PowerShellProcess(
this.powerShellExePath,
"[DBG] PowerShell Integrated Console",
"[TEMP] PowerShell Integrated Console",
this.log,
this.editorServicesArgs + "-DebugServiceOnly ",
sessionPath,
Expand Down