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

Fix Several Windows Debugging Issues #1083

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

plemarquand
Copy link
Contributor

@plemarquand plemarquand commented Sep 19, 2024

Fixes up some issues with Windows debugging found in the latest 6.0 toolchain:

  • Add Testing.dll to the PATH same as XCTest.dll
  • Don't append .exe when debugging testing binaries
  • Don't follow incorrectly created symlink at .\build\debug, point to real folder at the build triple path

Fixes up some issues with Windows debugging found in the latest 6.0
toolchain:
- Add Testing.dll to the PATH same as XCTest.dll
- Don't append .exe when debugging testing binaries
- Don't follow incorrectly created symlink at `.\build\debug`, point to
  real folder at the build triple path
@plemarquand plemarquand force-pushed the windows-debugging-paths branch from 68021aa to 12a1415 Compare September 19, 2024 17:02
@plemarquand plemarquand marked this pull request as ready for review September 19, 2024 17:13
@plemarquand
Copy link
Contributor Author

This works around this issue in SwiftPM/Foundation: swiftlang/swift-package-manager#7965

Copy link
Contributor

@award999 award999 left a comment

Choose a reason for hiding this comment

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

Looks good to me but can you review @matthewbastien since you're more familiar with this code

Copy link
Member

@matthewbastien matthewbastien left a comment

Choose a reason for hiding this comment

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

lgtm just one minor comment that probably needs a separate investigation

if (this.platform === "win32" && path.extname(launchConfig.program) !== ".exe") {
if (
this.platform === "win32" &&
launchConfig.testType === undefined &&
Copy link
Member

Choose a reason for hiding this comment

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

This works for now, but it would be nice to have a more "universal" way to determine if the .exe suffix needs to be added. I didn't anticipate this use case when I added this code. It could definitely use some work.

Perhaps we can have the auto-generated launch configurations use a target parameter instead of program, for example. That way the launch config can be used across all platforms while retaining the ability to target a specific executable for the tests.

I'm going to open up a separate issue from this since this needs to go in to unblock test debugging on Windows.

@plemarquand plemarquand merged commit b6b258c into swiftlang:main Sep 20, 2024
8 checks passed
@plemarquand plemarquand deleted the windows-debugging-paths branch September 20, 2024 18:43
@plemarquand plemarquand added the needs verification Issue has been fixed, but requires verification before closing label Sep 20, 2024
@matthewbastien
Copy link
Member

Verified with 737ad69

@matthewbastien matthewbastien removed the needs verification Issue has been fixed, but requires verification before closing label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants