Skip to content

Introduce Debug and Release configurations #3775

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 1 commit into from
Jan 21, 2022

Conversation

andyleejordan
Copy link
Member

@andyleejordan andyleejordan commented Jan 20, 2022

The debug build creates a symlink to PSES, rebuilds PSES, does not
minify the extension, and generates a TypeScript sourcemap. The release
build deletes the symlink if it exists and copies PSES, only builds PSES
if not already copied, minifies the extension, and does not generate a
TypeScript sourcemap. This removes the manual LinkEditorServices step
and ensures that the developer debugging experience works well.

@andyleejordan andyleejordan added the Ignore Exclude from the changelog. label Jan 20, 2022
@andyleejordan andyleejordan changed the title Setup Release task in Invoke-Build Introduce Debug and Release configurations Jan 20, 2022
@andyleejordan andyleejordan force-pushed the andschwa/release-task branch 2 times, most recently from c301a87 to 019112a Compare January 20, 2022 19:22
@andyleejordan andyleejordan marked this pull request as draft January 20, 2022 19:38
@andyleejordan andyleejordan force-pushed the andschwa/release-task branch 6 times, most recently from 7e2d219 to 98210d2 Compare January 20, 2022 20:52
@andyleejordan andyleejordan marked this pull request as ready for review January 20, 2022 20:57
@andyleejordan andyleejordan enabled auto-merge (squash) January 20, 2022 21:50
@andyleejordan andyleejordan changed the title Introduce Debug and Release configurations Introduce Debug and Release configurations Jan 20, 2022
@andyleejordan
Copy link
Member Author

@JustinGrote Want to help me merge this 😂

The debug build creates a symlink to PSES, rebuilds PSES, does not
minify the extension, and generates a TypeScript sourcemap. The release
build deletes the symlink if it exists and copies PSES, only builds PSES
if not already copied, minifies the extension, and does not generate a
TypeScript sourcemap. This removes the manual `LinkEditorServices` step
and ensures that the developer debugging experience works well.
@andyleejordan andyleejordan force-pushed the andschwa/release-task branch 2 times, most recently from 958967e to d396435 Compare January 21, 2022 01:41
@JustinGrote
Copy link
Collaborator

@andschwa shouldn't the code workspace include a debug build task?
image

@JustinGrote
Copy link
Collaborator

Also while not necessary to cover in this PR, I really would like to figure out a way to build a "watch" that, on C# change, would rebuild editor services and reload the extension host. dotnet watch run can cover the first part, I don't know if we can figure out a hook to reload the extension host debug process.

@andyleejordan
Copy link
Member Author

@andschwa shouldn't the code workspace include a debug build task?
image

Doesn't need a debug "task" since it has a debug launch configuration (both of them, actually):

Screen Shot 2022-01-21 at 1 55 51 PM

"Launch Extension" launches the extension under the VS Code debugger (and this PR explicitly ensure that actually works well by not minifying the code when developing), and "Attach to Editor Services" then will ask for the pwsh process to attach to (running under that launched Code instance with the extension).

If you're asking if the build task needs to be in -Configuration Debug, that's just the default build. -Configuration Release is only needed when releasing, and the automated pipelines do exactly that.

@andyleejordan
Copy link
Member Author

Also while not necessary to cover in this PR, I really would like to figure out a way to build a "watch" that, on C# change, would rebuild editor services and reload the extension host. dotnet watch run can cover the first part, I don't know if we can figure out a hook to reload the extension host debug process.

I'll look into it!

@JustinGrote
Copy link
Collaborator

LGTM then, I didn't notice debug was the default, that explains what I missed.

@andyleejordan andyleejordan merged commit 1be200b into master Jan 21, 2022
@andyleejordan andyleejordan deleted the andschwa/release-task branch January 21, 2022 23:13
fflaten added a commit to fflaten/vscode-powershell that referenced this pull request Aug 3, 2023
Task was removed in PowerShell#3775, now automatic for Debug-builds.
andyleejordan pushed a commit that referenced this pull request Aug 3, 2023
Task was removed in #3775, now automatic for Debug-builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ignore Exclude from the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants