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 #23: Can't debug unit tests on VS2015 RC #104

Merged
merged 6 commits into from
May 11, 2015
Merged

Conversation

int19h
Copy link
Contributor

@int19h int19h commented May 8, 2015

Fix #23: Can't debug unit tests on VS2015 RC

Use an environment variable to propagate process ID of devenv.exe to the test executor process, instead of relying on a command line switch to the latter that is no longer present in VS 2015.

Do not cache the obtained DTE instance - it does not work when it's passed between threads, and in VS 2015 test executor performs initialization and test running on different threads.

int19h added 3 commits May 4, 2015 15:56
Use an environment variable to propagate process ID of devenv.exe to the test executor process, instead of relying on a command line switch to the latter that is no longer present in VS 2015.
…assed between threads, and in VS 2015 test executor performs initialization and test running on different threads.

}
}
/* ****************************************************************************
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'm not sure why this shows up as changed. When I have both branches checked out locally and compare the files directly, they're byte for byte identical (i.e. there's no line ending differences or tab differences). Suggestions?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's probably line endings. Check your autocrlf settings in git - git config core.autocrlf
https://github.com/Microsoft/PTVS/pull/104/files?w=1 will show the changes without whitespace differences.

Copy link
Contributor

Choose a reason for hiding this comment

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

but unfortunately you can't actually comment in that view 😦

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's what I thought initially, but, as noted earlier, diffing the branches locally shows no differences, not even in line endings (I used fc /b).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or are you saying that it adjusts the line endings when I check out, and so I don't actually see what's in the branch?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. If you look at the raw files, the old version uses CRLF and the new version uses LF. This is probably because core.autocrlf is set to 'input' on your machine.

@mousetraps
Copy link
Contributor

👍

@huguesv
Copy link
Contributor

huguesv commented May 8, 2015

I think you can get rid of _dte private member and its only use in Dispose(). Looks good otherwise.

@int19h int19h force-pushed the fix-23 branch 2 times, most recently from bd32c71 to 23026ae Compare May 8, 2015 22:37
@@ -75,6 +67,10 @@ class VisualStudioApp : IDisposable {
[DllImport("ole32.dll")]
private static extern int CreateBindCtx(uint reserved, out IBindCtx ppbc);

public DTE GetDTE() {
return GetDTE(_processId);
Copy link
Member

Choose a reason for hiding this comment

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

I believe this can return null - can we check here and get a better exception than a nullref later on? InvalidOp is fine, or make a new one so that we can at least capture the name in crash reports.

@zooba
Copy link
Member

zooba commented May 9, 2015

With the one change (or a good reason not to do it), it's good. Go ahead and merge.

int19h added a commit that referenced this pull request May 11, 2015
Fix #23: Can't debug unit tests on VS2015 RC
@int19h int19h merged commit a04d108 into microsoft:master May 11, 2015
@int19h int19h deleted the fix-23 branch May 11, 2015 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't debug unit tests on VS2015 RC
5 participants