-
Notifications
You must be signed in to change notification settings - Fork 675
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
Conversation
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.
|
||
} | ||
} | ||
/* **************************************************************************** |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 😦
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
👍 |
I think you can get rid of _dte private member and its only use in Dispose(). Looks good otherwise. |
bd32c71
to
23026ae
Compare
@@ -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); |
There was a problem hiding this comment.
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.
With the one change (or a good reason not to do it), it's good. Go ahead and merge. |
Fix #23: Can't debug unit tests on VS2015 RC
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.